Is there a way to negate #NUM! from being displayed when formula refers to an empty cell?

johnnymotown

New Member
Joined
Apr 24, 2014
Messages
4
I have the following formula that calculates the number of days between two dates.

=DATEDIF(R3,S3,"D")

R3 is "Date Listed"
S3 is "Date Sold"

However, I don't enter the "Date Sold" until the item is sold obviously. The problem is, I don't want my sheet littered with #NUM! until I enter a date into "Date Sold".

Is there a way to negate that (#NUM!) text from being displayed? Is there a way to write into the formula that if "S3" is blank that nothing is displayed in the field?

Thank you in advance for your help.
 

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.
Try:
=IF(S3="","",DATEDIF(R3,S3,"D"))
or using IFERROR
Check this out:
How to get rid of the error message? | wmfexcel


I have the following formula that calculates the number of days between two dates.

=DATEDIF(R3,S3,"D")

R3 is "Date Listed"
S3 is "Date Sold"

However, I don't enter the "Date Sold" until the item is sold obviously. The problem is, I don't want my sheet littered with #NUM! until I enter a date into "Date Sold".

Is there a way to negate that (#NUM!) text from being displayed? Is there a way to write into the formula that if "S3" is blank that nothing is displayed in the field?

Thank you in advance for your help.
 
Upvote 0
I tried that and had no problem.
Are you sure the date input in R3 and S3 are values (formatted as Date), not text?


I'm trying to use the ISERROR function and came up with this:

=IF(ISERROR(DATEDIF(R3,S3,"D"))," ",DATEDIF(R3,S3,"D”))

But it's not working.
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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