How this formula be improved to check for text N/A

dd8

New Member
Joined
Feb 21, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I have inherited a spreadsheet from someone. The original formula works out the number of days.
DAYS TILL DUE = Due Date - todays date

DAYS TIL DUE
=[@[DUE DATE]]-TODAY()

The column is formatted as Number. Due Date column contains a mix of date and text 'N/A' If no date the user enters N/A

Cells containing N/A the formula result is an error displaying #VALUE!

How can the formula be edited to clean up to ..
Check for text 'N/A' and the result 'No date'
Else
work out Days Till Due

TIA
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
The column is formatted as Number. Due Date column contains a mix of date and text 'N/A' If no date the user enters N/A

Cells containing N/A the formula result is an error displaying #VALUE!
Check this and revert -

Excel Formula:
=Ifs(ISNA([@[DUE DATE]]),"No Date",True,[@[DUE DATE]]-TODAY())
 
Upvote 0
@


Example of values in
DUE DATE
2/11/2024
2/11/2024
N/A
N/A
29/12/2024
30/08/2024
N/A
N/A


I add
=Ifs(ISNA([@[DUE DATE]]),"No Date",True,[@[DUE DATE]]-TODAY())

The returned results are incorrect

18/07/1900
18/07/1900
#VALUE!
#VALUE!
 
Upvote 0
There was mistake in understanding. Change the formula to

Excel Formula:
=Ifs([@[DUE DATE]]="N/A","No Date",True,[@[DUE DATE]]-TODAY())
 
Upvote 0
Many thanks. I used the following to work. all good ..

=IFERROR([@[DUE DATE]]-TODAY(),"No date")
 
Upvote 0
Many thanks. I used the following to work. all good ..

=IFERROR([@[DUE DATE]]-TODAY(),"No date")
Would suggest marking it as solution. It helps other to quickly navigate when visiting thread.
 
Upvote 0
In future please mark the post that contains the solution, I have changed it for you.
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,664
Members
449,114
Latest member
aides

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