# Coiuntifs Formula Help Needed

Hi!

Can anyone please assist with the correct Formula? i'm trying to count how many rows are on a sheet(Reference Sheet)

the criterea for the rows are as follows: =countifs STATUS Column is "Discharged" or "ACTIVE" , Discharged/Nonadmit Column is Greater than 05/19/2023 and Date activated column is less than 05/27/2023

I Created this Formula but its coming up unparseable. can anuyone help where im going wrong?

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

• @Ymandel See if this version works:

=COUNTIFS([Discharged Date]:[Discharged Date], >DATE(2023, 5, 26), [Date Activated]:[Date Activated], <=(DATE(2023, 6, 2)), [Status]:[Status], OR(@cell = "Active", @cell = "Discharged"))

• @Ymandel See if this version works:

=COUNTIFS([Discharged Date]:[Discharged Date], >DATE(2023, 5, 26), [Date Activated]:[Date Activated], <=(DATE(2023, 6, 2)), [Status]:[Status], OR(@cell = "Active", @cell = "Discharged"))

• Yes! it did. i added the @cell and its working well. thank you so much!

• So now this formula works well

=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?

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!