Formula with IF, TODAY and MAX not working.

reberryjr

Well-known Member
Joined
Mar 16, 2017
Messages
714
Office Version
  1. 365
Platform
  1. Windows
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?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
It's returning a value of 0, but AZ2 is not = "", so it should move to the false portion of the formula.
 
Upvote 0
AZ2 contains a date, and the formula is entered in a sheet called Summaries.
 
Upvote 0
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.
 
Upvote 0
I tried that, but it's still returning a value of 0, despite there being a date in AZ2
 
Upvote 0
And that is AZ2 on the 'Summaries' sheet that has a date in it, correct?
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top