If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Count
Hi - I'm trying to create a spreadsheet which contains a column that calculates the number of days between dates and then a cell that adds up the total of the dates. For the date calculation I have tried using =datedif(a1,b1,"d") - this is fine if you enter both dates however, if some are to follow i.e you have the date to enter in A1 but not b1 then the formula returns #NUM! and consequently the addition cell will not give any result in respect of other rows where you have been able to enter both dates - you could say well dont enter any data until you have both dates however, the purpose of the spreadsheet is to record info as its received. Ideally I would like the date formula to return 0 if the date for cell b1 is not yet known. Sounds confusing but I dont know how to say any other way - can anyone help? -- martins ------------------------------------------------------------------------ martins's Profile: http://www.excelforum.com/member.php...o&userid=31616 View this thread: http://www.excelforum.com/showthread...hreadid=522849 |
#3
|
|||
|
|||
Date Count
Martins
I hope I understand, try... IF(OR(A1="",B1=""),0,DATEDIF(A1,B1,"d")) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "martins" wrote in message ... Hi - I'm trying to create a spreadsheet which contains a column that calculates the number of days between dates and then a cell that adds up the total of the dates. For the date calculation I have tried using =datedif(a1,b1,"d") - this is fine if you enter both dates however, if some are to follow i.e you have the date to enter in A1 but not b1 then the formula returns #NUM! and consequently the addition cell will not give any result in respect of other rows where you have been able to enter both dates - you could say well dont enter any data until you have both dates however, the purpose of the spreadsheet is to record info as its received. Ideally I would like the date formula to return 0 if the date for cell b1 is not yet known. Sounds confusing but I dont know how to say any other way - can anyone help? -- martins ------------------------------------------------------------------------ martins's Profile: http://www.excelforum.com/member.php...o&userid=31616 View this thread: http://www.excelforum.com/showthread...hreadid=522849 |
#4
|
|||
|
|||
Date Count
Thanks guys - -problem solved - -- martins ------------------------------------------------------------------------ martins's Profile: http://www.excelforum.com/member.php...o&userid=31616 View this thread: http://www.excelforum.com/showthread...hreadid=522849 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Current date & record count | IT05 | Running & Setting Up Queries | 2 | February 10th, 2006 12:40 PM |
Sequential Numbering Problem | Alex | Running & Setting Up Queries | 9 | January 24th, 2006 11:38 PM |
NETWORKDAYS - Multiple Date Selection | Annabelle | General Discussion | 3 | October 4th, 2005 07:04 PM |
Copy Cat Ain't Working | shep | Setting Up & Running Reports | 15 | September 12th, 2005 05:14 PM |
Aggregating Date Data into Weeks and Quarters | Roger | Running & Setting Up Queries | 3 | July 11th, 2004 05:56 PM |