IF forumla on cell that sometimes blank, sometimes a date

JohnnyPicnic

New Member
Joined
Feb 8, 2021
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Hi all,

I'm attempting to perform and IF statement against a cell that is sometimes blank and sometimes contains a date. The expected result is:
blank = leave blank
greater than 30 days = Data↑
between 15-30 days = Data↓

my formula =IF(TODAY()-D7>30, "Data↑", IF(AND(TODAY()-D7>=15, TODAY()-D7<=30), "Data↓",""))

I can't get to a formula that leaves the cell blank.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
How about
Excel Formula:
=IF(D7="","",IF(TODAY()-D7>30, "Data↑", IF(AND(TODAY()-D7>=15, TODAY()-D7<=30), "Data↓","")))
 
Solution

JohnnyPicnic

New Member
Joined
Feb 8, 2021
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
How about
Excel Formula:
=IF(D7="","",IF(TODAY()-D7>30, "Data↑", IF(AND(TODAY()-D7>=15, TODAY()-D7<=30), "Data↓","")))
Thank you! I had tried something similar but I think I missed space or comma somewhere.
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,562
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,568
Messages
5,637,094
Members
416,957
Latest member
Brovashift

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
Top