By: Soumik Dutta

In reply to Brennan.

Hi Brennan,
Thanks for your comment. You cannot use any function in the ‘criteria’ field of the COUNTIF function. You must have to input a specific text or value. Moreover, you have to mention a range of cells in the ‘criteria_range 1’ field, where the function count for your desired data. If you input a single cell instead of a range of cells, the COUNTIF function will not show the sum of the total count.
You can consider some other Excel functions like VLOOKUP and TODAY functions to get the decision if your worksheet allows you to place the value of cells L5, O5, R5, U5, X5, and AA5 in the conjugative cells whether row-wise or column-wise. I am telling you the process below.
First, set two criteria. As you want to show the value less or equal to 90 days, so you can set 90 for <= 90 days and 91 for >90 days.
Then, using the VLOOKUP and TODAY functions, write down the formula:
=VLOOKUP(TODAY()-[Cell Ref],Criteria,2,TRUE)
Here,
[Cell Ref] stands for your desired cell
‘Criteria’ is the table array name that I mentioned in the first step.
2 is the col_indes_number. This number tells the function which column value of the criteria table we want to show.
As you get the decision of the VLOOKUP function, whether it is more than 90 days or less than 90 days, use the COUNTIF function to get the total count of less than or equal to 90 days.
=COUNTIFS([Cell Ref. Range,”<= 90 Days")
Here,
“<= 90 Days" is the desired criteria. For a better demonstration of this procedure, you can also look at one of our similar types of articles, How to Use Stock Ageing Analysis Formula in Excel.

If you are still facing any problems, please inform us.