Excel Help please.
- Target
- Protoform
- Posts: 344
- Joined: Mon Feb 05, 2007 2:47 pm
- Location: The Midlands - Melton Mowbray home of the pork pie
Excel Help please.
I’m trying to do something that should be simple, but I just can’t get my head round it.
One team divide their time up into blocks of 6 hours. They want something so they can type in the total number of blocks (this changes) say 15, and this will return the answer of 90:00 (90 hours:00 mins) 6 hours multiply by 15 blocks. The 6 hours never change but the number of blocks will. They want it displayed in the HH:MM format.
Then they have a cell with the actual time spent, this again could be anything in HH:MM format, say 75:30.
Then a final cell which shows the difference between the two sets of time.
I feel this should be nice and easy but when I convert to HH:MM I get a blank cell or instead of say 75:30 I get 03:30.
Please tell me how to do this. Hope this makes sense!
Cheers.
One team divide their time up into blocks of 6 hours. They want something so they can type in the total number of blocks (this changes) say 15, and this will return the answer of 90:00 (90 hours:00 mins) 6 hours multiply by 15 blocks. The 6 hours never change but the number of blocks will. They want it displayed in the HH:MM format.
Then they have a cell with the actual time spent, this again could be anything in HH:MM format, say 75:30.
Then a final cell which shows the difference between the two sets of time.
I feel this should be nice and easy but when I convert to HH:MM I get a blank cell or instead of say 75:30 I get 03:30.
Please tell me how to do this. Hope this makes sense!
Cheers.
If you can keep your head when all around are loosing theirs...you probably haven’t grasped the situation!!
- secretcode
- Posts: 3717
- Joined: Sun Jul 08, 2007 7:50 pm
- Contact:
- Halfshell
- Posts: 19167
- Joined: Sat Sep 16, 2000 4:00 am
- Location: Don't complain to me. I don't care.
- Contact:
Uhm... I can tell you why it's doing that (HH:MM is clock time, rather than value -- 75:30 is half three in the morning, three days hence)... as for the best way around it...Target wrote:I feel this should be nice and easy but when I convert to HH:MM I get a blank cell or instead of say 75:30 I get 03:30.
Output it as a straight numerical value of minutes, then extrapolate that into two further cells, one of which displays the minutes, the other hours?
75hrs 30 is 4530 minutes, yeah?
So cellA is the cumulative minutes.
cellB would be "=sum(cellA/60)" giving your hours, displayed to 0dp.
Then something for cell C that extrapolates the decimal point from cellB and works it back into minutes.
I could probably knock something up if I had the spreadsheet in front of me... I'm not so good at working remotely!
- Halfshell
- Posts: 19167
- Joined: Sat Sep 16, 2000 4:00 am
- Location: Don't complain to me. I don't care.
- Contact:
Haha! I am truly a god amongst men!
Okay.
Output your value as just a flat out number of minutes (being, in the example above, 4530).
For argument's sake, let's say the cell with that number in is A1.
In the next column [B1], you need the formula =ROUND(A1/60-0.5,0)
That'll give you an output of exactly 75 (being the number of hours).
In the subsequent column, enter the formula =SUM((A1/60)-(B1))*60
Which will give you the number of minutes additional to the hours already calculated.
Just substitute A1 and B1 for whatever the cells are in your existing spreadsheet, and copy the formula down the column. Hiding the 4530 column if you so desire.
Shout if you've got any problems.
Okay.
Output your value as just a flat out number of minutes (being, in the example above, 4530).
For argument's sake, let's say the cell with that number in is A1.
In the next column [B1], you need the formula =ROUND(A1/60-0.5,0)
That'll give you an output of exactly 75 (being the number of hours).
In the subsequent column, enter the formula =SUM((A1/60)-(B1))*60
Which will give you the number of minutes additional to the hours already calculated.
Just substitute A1 and B1 for whatever the cells are in your existing spreadsheet, and copy the formula down the column. Hiding the 4530 column if you so desire.
Shout if you've got any problems.
- Target
- Protoform
- Posts: 344
- Joined: Mon Feb 05, 2007 2:47 pm
- Location: The Midlands - Melton Mowbray home of the pork pie
Thanks Halfshell, that's blooming Brilliant!!
Any ideas about the first section, turning the 15 blocks by 6 hours?
I found a formula on the net doing a search, but I don't understand it.
=INT(B23) & "." & INT((B23-INT(B23))*60)
That seems to do it, but only gives me HH:M
But I can live with it!!
Any ideas about the first section, turning the 15 blocks by 6 hours?
I found a formula on the net doing a search, but I don't understand it.
=INT(B23) & "." & INT((B23-INT(B23))*60)
That seems to do it, but only gives me HH:M
But I can live with it!!
If you can keep your head when all around are loosing theirs...you probably haven’t grasped the situation!!
- Sixswitch
- Posts: 8295
- Joined: Thu Dec 20, 2001 5:00 am
- Location: Sent to outer space, to find another happy place.
- Contact:
Right click on the cell where you want your calculation result and choose 'Format Cell'
In the list on the left, choose 'Custom'
In the box on the right (not the selection box, the box above it) enter: [h]:mm
Click OK
That should sort you out.
In the list on the left, choose 'Custom'
In the box on the right (not the selection box, the box above it) enter: [h]:mm
Click OK
That should sort you out.
I found God. Then I lost him. He'll probably turn up down the back of the sofa someday.
"The early bird gets the worm, but the early worm is ****ed."
"I'm not oppressing you Stan, but you haven't got a womb. Where's the fetus going to gestate? You going to keep it in a box?"