# How to utilize 2 criteria for a whatif formula/array formula

I need to create a count of data that meets two criteria. Column one consist of dates. For this one, the input to count is today, or TODAY(). The dates will be entered in B2:B100

The second column is Status with desired input to count is "To Do". The status will be entered in D2:D100.

## 2 Answers

You can also use the COUNTIFS formula to do that, like so:

``````=COUNTIFS(B2:B100, TODAY(), D2:D100, "To Do")
``````
• This would be the better way to do it. Completely forgot this had a multiple argument type. – STowslee Jan 16 '17 at 17:39

One way you can do this is to do an evaluation in a new column, then check the output value with your countif statement.

In one column have it determine whether or not both criteria are met:

``````=IF(AND(B2 = SOMETHING, D2 = SOMETHING_ELSE),"TRUE","FALSE")
``````

What this does is says that if B2 is equal to SOMETHING and D2 is equal to SOMETHING_ELSE, return the string "TRUE", if both conditions are not met than return the string "FALSE".

So if we put the formula above in column G the countif would look something like:

``````=countif(G:G,"TRUE")
``````

Anything which returned a string "TRUE" will be counted, and the ones which failed the AND criteria and returned the string "FALSE" are not counted.