Adding/subtracting dates and the '#NUM!" remark

BlueskiesChicago

New Member
Joined
Apr 25, 2002
Messages
2
I need to add or subtract a time period (2 months, for example) to or from a date in another cell. If the other cell is blank, I receive a "1900" date in the new cell when adding; and a "NUM!" remark when subtracting.
If my formula for B17 is
=DATE(YEAR(B39),MONTH(B39)-2,DAY(B39))
and B39 is as yet blank, is there a way to hide the "NUM!" remark until B39 has some information entered?

Thanks for any assistance!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
On 2002-04-26 12:52, BlueskiesChicago wrote:
I need to add or subtract a time period (2 months, for example) to or from a date in another cell. If the other cell is blank, I receive a "1900" date in the new cell when adding; and a "NUM!" remark when subtracting.
If my formula for B17 is
=DATE(YEAR(B39),MONTH(B39)-2,DAY(B39))
and B39 is as yet blank, is there a way to hide the "NUM!" remark until B39 has some information entered?

Thanks for any assistance!

Try:

=IF(B39,DATE(YEAR(B39),MONTH(B39)-2,DAY(B39)),"")
 
Upvote 0
You could use something like this:

=IF(ERROR.TYPE(DATE(YEAR(B39),MONTH(B39)-2,DAY(B39))) = 6, "No Date Yet", DATE(YEAR(B39),MONTH(B39)-2,DAY(B39)))

but Aladin or maybe even Chris Davison will give a more concise formula.

c.f. http://www.mrexcel.com/board/viewtopic.php?topic=5023&forum=2&4 :LOL: :LOL:

EDIT:: See? Told you, he even hit Submit just before me, whatta guy. :biggrin:
_________________<font color = green> Mark O'Brien
This message was edited by Mark O'Brien on 2002-04-26 12:58
 
Upvote 0

Forum statistics

Threads
1,213,496
Messages
6,113,995
Members
448,539
Latest member
alex78

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