# Using countifs with a date range

edited 07/07/23

I am creating a formula using the Area column and the another column with data like "redline".

I need to count the redline column when

1. the Area column is a certain number e.g. 400.
2. the Redline column is not blank. dates are entered in this column

I stuck as to how to complete the formula:

=countifs(Area;400;Redline;???)

Please assist in completing the formula.

• ✭✭✭✭✭✭

The formula for your requirements is:

=COUNTIFS(Area:Area, 400, Redline:Redline, <>"")

If you wanted to do a range for area then you can use a greater and less than, For example, greater than 390 and less than 410 would be:

=COUNTIFS(Area:Area, >390, Area:Area, <410, Redline:Redline, <>"")

For the same criteria but less/greater than & equal to:

=COUNTIFS(Area:Area, >=390, Area:Area, <=410, Redline:Redline, <>"")

Hope this helps, but if you've any problems/questions then just post! 😊

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!