How would you extract the time from a cell formatted as 01/01/2017 01:00 PM and get the difference from another cell with the same format without splitting the cells out into two columns?
How would you extract the time from a cell formatted as 01/01/2017 01:00 PM and get the difference from another cell with the same format without splitting the cells out into two columns?
Peace of mind is found in some of the strangest places.
If they are date/time numbers, then =A1-B1. If more than 24 hours, convert the day difference to hours. e.g. =(A1-B1)*(24) or, do the A1-B1 but set the Number Format to [hh].
Not exactly sure I understand, but I think it's just a matter of subtracting and formatting
Capture.JPG
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3