Likes:  0

Thread: Formula with IF, TODAY and MAX not working.

1. Formula with IF, TODAY and MAX not working.

I'm not sure why this formula isn't working. If AZ2 = "", then I want to return the value of 0. If it isn't null, I want to get the number of days between Today and the max date in column AZ.

=IF(AZ2="",0,TODAY()-(MAX(Financials!AZ:AZ)))

When I enter the formula on the Financials sheet, it works fine (obviously without the sheet reference).

Thoughts?

2. Re: Formula with IF, TODAY and MAX not working.

How is it not working?

3. Re: Formula with IF, TODAY and MAX not working.

It's returning a value of 0, but AZ2 is not = "", so it should move to the false portion of the formula.

4. Re: Formula with IF, TODAY and MAX not working.

What is in AZ2?

5. Re: Formula with IF, TODAY and MAX not working.

This AZ2 is a cell of Financials!AZ:AZ?

And in which sheet are you running your formula?

6. Re: Formula with IF, TODAY and MAX not working.

AZ2 contains a date, and the formula is entered in a sheet called Summaries.

7. Re: Formula with IF, TODAY and MAX not working.

Originally Posted by reberryjr
AZ2 contains a date, and the formula is entered in a sheet called Summaries.
Entered in Summaries, say in A4, the formula:

=IF(AZ2="",0,TODAY()-MAX(Financials!AZ:AZ))

would give a 0 if AZ2 is empty or a figure that would result from substracting MAX of the AZ column from Today's date.

8. Re: Formula with IF, TODAY and MAX not working.

I tried that, but it's still returning a value of 0, despite there being a date in AZ2

9. Re: Formula with IF, TODAY and MAX not working.

And that is AZ2 on the 'Summaries' sheet that has a date in it, correct?

10. Re: Formula with IF, TODAY and MAX not working.

Is the workbook on auto-calculate?