Return Zero in Date Subtraction

Celticshadow

Active Member
Joined
Aug 16, 2010
Messages
419
Office Version
  1. 365
Platform
  1. Windows
Hi All

I have a range of dates in a row extending to ten columns but sometimes not all cells in the row have a date (the cells with dates in are dependent on other cells - so if the dependent cell does not have a date it the cell returns 00-Jan-00).

If for example the first two cells in the row had two dates as attached how do I get the cell to return zero when subtracting one from the other.

Thanking you in advance.

Kind Regards


https://spreadsheets.google.com/ccc?hl=en&key=tYgdzUn_vPqgbN6E0_dqtmA&authkey=CImkspwI&hl=en#gid=0
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi All

I have a range of dates in a row extending to ten columns but sometimes not all cells in the row have a date (the cells with dates in are dependent on other cells - so if the dependent cell does not have a date it the cell returns 00-Jan-00).

If for example the first two cells in the row had two dates as attached how do I get the cell to return zero when subtracting one from the other.

Thanking you in advance.

Kind Regards


https://spreadsheets.google.com/ccc?hl=en&key=tYgdzUn_vPqgbN6E0_dqtmA&authkey=CImkspwI&hl=en#gid=0
What is the question as =C4-D4 yields 0?
 
Upvote 0
Hi Aladin

How do I get B4 - C4 to equal zero and not as is. C4 is dependent on a date being entered in another cell as it is not it returns 40,497 instead of 0.

Kind Regards

B4: 14-Nov-10
C4: 30-Dec-99

You say: =B4-C4 should yield 0. How do you mean that?
By the way, I get: 3972.
 
Upvote 0
In B6 enter and copy across:

=IF(COUNT(A4:B4),A4-B4,0)

Hi Aladin

Many thanks for replying.

Unfortunately that formula still returns a figure above zero in C6 when the formula is copied across. Where as I need it to return Zero.

Kind Regards
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,240
Members
452,898
Latest member
Capolavoro009

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