Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Multiple Dates to Get Total Days 1

Status
Not open for further replies.

5656

Technical User
Jan 6, 2001
68
US
I'm running into a problem here and would appreciate any help.
I have 3 columns -- a date will be entered into each, in chronological order (in date format). The fourth column will be a "Total Days" column where I would like to compute the total number of days included from the first date (first column) to the third date (third column). Any suggestions ?

Thanks !!
 
Thank you.
It is Excel...I feel a bit foolish...didn't realize it's that simple.
Thanks again !
 
ok, one more question concerning the above...
lets say for a particular row, that the cell of the third date column for example is not filled in - user leaves blank. Is there any way that I can have my fourth column ("Total Days") show nothing -- so it's simply blank -- rather than displaying "#VALUE!" or an inaccurate negative number that I keep getting.

Thanks again for any help.
 
=IF(C3>0,C3-A3,"")

The IF function has three parts:
the test (is there anything in cell C3?),
what to do if the test is true (C3-A3),
what to do if the test if false (insert nothing).
 
ok ok, ok...I'm absolutely terrible at programming so here's my problem now: 2 of the 3 date columns could possibly be left blank...is there a way to show nothing in the "TOTAL DAYS" column if 2 of my 3 date columns are left blank (vs. only one being left blank as I stated in previous email)...thanks again !!
 
Try this:

=IF(B1>0,IF(C1>0,C1-A1,""),"")

This is a nested IF function and all I am doing is testing 2 cells, one after the other.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top