Return N/A if date field is blank

eganmom

New Member
Joined
Jan 11, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
I am not great at excel formulas but have managed to cobble together an IF/AND string of formulas in order to convert a date in one column (col C) into an age range in another column (col D). However, if there is no date in col C, I want it to return N/A. Instead it is giving me “over 65” which is one of age ranges. What do I need to add to this or edit in order to obtain N/A for a blank cell?
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Welcome to the Board!

Wrap your original formula in an IF formula, like this (example for row 2):
=IF(C2="","NA",your original formula)
 
Upvote 0
Solution
Excel 1.JPG
 
Upvote 0
Welcome to the Board!

Wrap your original formula in an IF formula, like this (example for row 2):
=IF(C2="","NA",your original formula)
OMG, thank you so much! I have been googling and trying different things and nothing was working! Much appreciated Joe4!
 
Upvote 0
You are welcome.
Glad I was able to help!
:)
 
Upvote 0
You can also enclose your formula in an IFERROR( ) function. IFERROR(your original formula,""). Depending on how much data there is, this could calculate little faster.
 
Upvote 0
You can also enclose your formula in an IFERROR( ) function. IFERROR(your original formula,""). Depending on how much data there is, this could calculate little faster.
I don't think that will work in this case.
Their formula does not appear to returning an error, it is returning an unwanted result.
Note that It is not returning the "#N/A" error; they just WANT it to return "NA" when column C is blank.
 
Upvote 0
I don't think that will work in this case.
Their formula does not appear to returning an error, it is returning an unwanted result.
Note that It is not returning the "#N/A" error; they just WANT it to return "NA" when column C is blank.
You are correct. I need to read more carefully. :)
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,973
Members
448,933
Latest member
Bluedbw

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