I want to compare two dates to see if the time between them is greater or less than a set time. Is there a formula to do that?
![]() |
I want to compare two dates to see if the time between them is greater or less than a set time. Is there a formula to do that?
You can simply use subtraction and the result is the difference in days. If you want the difference in hours multiply by 24. So for example if cell A1 is "3/24/2013 10:13:00 AM," and cel lA2 is "3/12/2013 5:14:00 PM," then A1-A2 results in 11.7076 days. If you multiply that by 24 you get 280.98 hours.
Thanks for your response. Your method is easier than the way I was trying to do it. It has taken awhile to get back because I did encounter a problem.
In a clean sheet, it works fine. As does my more complex method. But in the spreadsheet I'm using, neither method works. Even if I retype other data in the relevant rows, it's a no go. There is evidently some invisible coding that is fouling up the works, but I have been unable to find out what and correct it.
Fortunately, this isn't a frequent calculation so I'll keep doing it manually when needed.
What version of Excel? There should be nothing to interfere with a formula like that? What results do you get?
Also make sure that the cells are properly formatted as dates or numbers.
All times are GMT -7. The time now is 09:49 AM. |