How to show hours:minutes when hours in one cell and mins in another

weaholt

New Member
Joined
Oct 9, 2006
Messages
18
Hope someone can help. This is driving me mad.

I have a spreadsheet where staff enter the number of hours leave allowance they have. The number of hours go in cell U7 and the number of minutes on cell V7. There are also 2 cells which are completed to show whether the member of staff had any leave leftover from the previous year, the hours go in cell U8 and the minutes in cell V8.

I used U7&”:”&V7 to combine the hours and minutes to combine and then added U8&”:”&V8 to get a starting total. This worked fine when the member of staff had leave left over, but if they had a negative figure (they had used too much from the year before) when I add the results from the two formulas above I get a #value error.
I would really appreciate some help ?
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
how about convert hr and min to one cell in hr first, i.e. =V7+V8/60 etc
 
Upvote 0
I’m back again :(

still the same scenario as above but I need to get it to work for negative numbers. So one cell could have -2(which is hours) and the other cell 10 (which is minutes). I can’t get the above suggestion to work with negative values.
 
Upvote 0
would you show an example that the below wouldn't work

Book1
UVWXY
6hrsminshrs/mins
7101510.25
8-210-1.83
98.42or8 hrs 25mins
Sheet1
Cell Formulas
RangeFormula
W7:W8W7=U7+V7/60
W9W9=SUM(W7:W8)
Y9Y9=INT(W9)& " hrs " &(W9-INT(W9))*60&"mins"
 
Upvote 0
would you show an example that the below wouldn't work

Book1
UVWXY
6hrsminshrs/mins
7101510.25
8-210-1.83
98.42or8 hrs 25mins
Sheet1
Cell Formulas
RangeFormula
W7:W8W7=U7+V7/60
W9W9=SUM(W7:W8)
Y9Y9=INT(W9)& " hrs " &(W9-INT(W9))*60&"mins"
Thank you for helping me - I'm part of the way there now but in your example it is adding the minutes together and not deducting them...

the sum would be 10:15 added to -2:10 which should come out at 8:05 not 8:25

Any ideas?
 
Upvote 0
ok, may be this

Book1
UVWXY
6hrsminshrs/mins
7101510.25
8-210-2.17
98.08or8 hrs 5 mins
Sheet1
Cell Formulas
RangeFormula
W7W7=U7+V7/60
W8W8=U8+SIGN(U8)*V8/60
W9W9=SUM(W7:W8)
Y9Y9=INT(SUM(W7:W8))&" hrs "&INT((W9-INT(W9))*60)&" mins"
 
Upvote 0
ok, may be this

Book1
UVWXY
6hrsminshrs/mins
7101510.25
8-210-2.17
98.08or8 hrs 5 mins
Sheet1
Cell Formulas
RangeFormula
W7W7=U7+V7/60
W8W8=U8+SIGN(U8)*V8/60
W9W9=SUM(W7:W8)
Y9Y9=INT(SUM(W7:W8))&" hrs "&INT((W9-INT(W9))*60)&" mins"
Wow - how do you work it out??! That's brilliant again!! Thank you so much :) I really appreciate you taking the time to help me xx
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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