Adding hours beyond 24 hours

hoyos

Board Regular
Joined
Jul 10, 2012
Messages
60
I need to add daily hours of work, an average days works adds up to 19 hours. I need to add at least one months worth of hours. Any ideas as to the best formula to use?
 

Some videos you may like

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
I need to add daily hours of work, an average days works adds up to 19 hours. I need to add at least one months worth of hours. Any ideas as to the best formula to use?

Could post an example?
 

oldbrewer

Well-known Member
Joined
Apr 11, 2010
Messages
11,005
sum(A1:A10) gives the total of the numbers in the first 10 rows of column A
 

hoyos

Board Regular
Joined
Jul 10, 2012
Messages
60
I have this code, if I fill it down the colunm and try to add the values up it returns #VALUE

=if(isblank(g4),"",if(isblank(f4),"",if(g4-f4=0,"24:00",if(g4-f4<0,24+g4-f4,g4-f4))))

Any ideas?
 

oldbrewer

Well-known Member
Joined
Apr 11, 2010
Messages
11,005

ADVERTISEMENT

what is in columns f and g ? are you calculating the hours worked based on start time and finish time ?
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Try this formula and format the cell as [h]:mm

=IF(COUNT(F4:G4)<2,"",IF(F4=G4,"24:00"+0,MOD(G4-F4,1)))

Excel Workbook
FGHIJK
410:00 PM10:00 PM24:00TOTAL HRS:34:30
510:00 PM8:30 AM10:30
Sheet1
 

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256

ADVERTISEMENT

You have not still provided any data hopfully Scott solution will work.
On the other hand have you tried to use Custom Format [h]:mm?
This will go beyond 24 hours.
 

oldbrewer

Well-known Member
Joined
Apr 11, 2010
Messages
11,005
If the start time and end time were entered as dd:mm:yy hh:mm then hours worked would be end time minus start time - much simpler.

(the visible formatting could be hh:mm to make it look prettier.)
 

hoyos

Board Regular
Joined
Jul 10, 2012
Messages
60
Try this formula and format the cell as [h]:mm

=IF(COUNT(F4:G4)<2,"",IF(F4=G4,"24:00"+0,MOD(G4-F4,1)))

Sheet1

*FGHIJK
410:00 PM10:00 PM24:00*TOTAL HRS:34:30
510:00 PM8:30 AM10:30***

<COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"><COL style="WIDTH: 91px"><COL style="WIDTH: 64px"></COLGROUP><TBODY>
</TBODY>

Spreadsheet Formulas
CellFormula
H4=IF(COUNT(F4:G4)<2,"",IF(F4=G4,"24:00"+0,MOD(G4-F4,1)))
K4=SUM(H:H)
H5=IF(COUNT(F5:G5)<2,"",IF(F5=G5,"24:00"+0,MOD(G5-F5,1)))

<TBODY>
</TBODY>

<TBODY>
</TBODY>


Excel tables to the web >> Excel Jeanie HTML 4

Thank you I shall try your suggestion and get back to you.
 

hoyos

Board Regular
Joined
Jul 10, 2012
Messages
60
You have not still provided any data hopfully Scott solution will work.
On the other hand have you tried to use Custom Format [h]:mm?
This will go beyond 24 hours.

Sorry about that, I tried to attach the file but got denied. I shall try Scotts suggestion first. Sorry for any inconvenienvce.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,493
Messages
5,601,998
Members
414,490
Latest member
Rip181

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
Top