# OR Function Help Needed

I Created this Formula Below:

=COUNTIFS({Discharged Date}, >(DATE(2023, 5, 26)), {Date Activated}, <(DATE(2023, 6, 2)), {Status}, OR(@cell = "ACTIVE", @cell = "DISCHARGED"))

However, i need to add in an OR function to the first 2 phrases.

it should count if {discharged date} is greater thatn 5.26.23 or Blank, AND {Date activated} us Less than 6.2.23 or Blank, AND {Status is Active or Discharged"

Can you help me with the correct formula?

• It would be the same way you have the OR function for the last range/criteria set. Double quotes can be used for "blank"

@cell = ""

• I tried it but its coming up invalid Data Type. this is the formula im trying

=COUNTIFS(OR({Discharged Date}, >(DATE(2023, 5, 26)), @cell = ""), OR({Date Activated}, <(DATE(2023, 6, 2)), @cell = ""), {Status}, OR(@cell = "ACTIVE", @cell = "DISCHARGED"))

please let me know where im going wrong

• That's not the same syntax as the last range/criteria set though.

You entered

OR({Range}, criteria, criteria)

The last range/criteria set is entered as

{Range}, OR(criteria, criteria)

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!