Calculating hours between selected cell entries in regards to a certain cell

David2

New Member
Joined
Jan 13, 2018
Messages
39
I have cells with the following, Day/Month/Year/Time/Timezone, format:
15. March 2018 13:18:42 CET


I would like to chose a certain cell, mark it as t0 (by putting 0 as value or checking a box or something) and then having Excel calculate the time difference for other cells (in hours, rounded down) in regards to that cell.


Example:
GRJvR8b

https://imgur.com/GRJvR8b


Additional info:
- If possible without macros
- If I could choose which cells I'd like to have time calculated for, that'd be great (see Example 3).

Hopefully I've explained it at least somewhat clear.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
How about?

ABCD
1TimeInitialStep1Difference
215/03/2018 13:18:4207:06:037
315/03/2018 06:12:39y00:00:00
415/03/2018 02:09:10##############

<tbody>
</tbody>

where the formula in C2 (and then copied to the others rows):

=IF(ISERROR(MATCH("Y",$B$2:$B$4,0)),"",A2-INDEX($A$2:$A$4,MATCH("Y",$B$2:$B$4,0),1))

and that in D2 is (and then copied to the others rows)

=IF(C2>0,C2,"")

You enter 'Y' into column B in the row you need to use as the reference point.

You can obviously hide column C, which just gives the intermediate result (in hh:mm:ss)

the cell format for d2, etc should just be set to "h" to display just the hours of the result


does that do what you need?
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,591
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top