5

I have a table like this (the C column is blank):

     A          B           C

1  19:30      23:00       (3.50)

2  14:15      18:30       (4.25)

I need to calculate the time difference in each row between column A and column B (always B - A), and put it in column C as a decimal number (as shown inside the parentheses).

Which formula should I use? Is it possible to generate a general formula, so I won't have to change the row number every time (maybe INDIRECT)?

14

If you use MOD that will also work when the times cross midnight, e.g. in C2

=MOD(B2-A2,1)*24

copy formula down column and the row numbers will change automaticaly for each row

| improve this answer | |
7

This will do the job:

=(B1-A1)*24

You might need to format the cell as number, not time!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.