In cell A1 i had put a date with time (12/1/2009 11:55:00 AM) and in cell B1 another date (12/8/2009 11:55:00 AM). What i need is - in cell C1- total number of night between these dates.. Please help
In cell A1 i had put a date with time (12/1/2009 11:55:00 AM) and in cell B1 another date (12/8/2009 11:55:00 AM). What i need is - in cell C1- total number of night between these dates.. Please help
Hi Jopi,
welcome to this forum.
Reading your question, I wonder...., what is your definition of "night"? Can you express in words what you would want Excel to look for and count?
When does "night" start? 7pm? 10pm? When does "night" end. 5am?
If your end date is 12/8/2009 05:55:00 AM, is that still within the night? Has the night passed? should it be counted?
Last edited by teylyn; 12-08-2009 at 04:32 AM.
If on the off chance you mean in terms of "stay" (hotel) - then perhaps: =INT(B1)-INT(A1)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
DO, that kind of depends on the hotel's rules. Over here, at least, if you don't check out by a certain time (often 11am or noon), they charge you for another night. I think yours would have to be modified to ROUND(B1,0)-INT(A1) if noon checkout time or ROUND(B1+1/24,0)-INT(A1) if 11.
Thanks a lot. " =INT(B1)-INT(A1) " is working fine for me
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks