Sum Column issues

Guzzlr

Well-known Member
Joined
Apr 20, 2009
Messages
982
Office Version
  1. 2021
Platform
  1. Windows
Hello Everybody!
got a small problem... I have a column of numbers which I need to sum. the problem is the numbers have the word "hrs" after them: 49 hrs.
So, when I sum the column, excel comes out with 0, instead of the total for the column.
How do I get excel to ignore the word "hrs", and just add the numbers?
Thanks for the help
Charles
excel 2010
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I'm sure there's a quicker way but this will work.

First, assume that the number of hours will be no more than two digits (eg. 46 hrs).
In column A you have the hrs, in the format of 46 hrs, in column B have:

Code:
=MID(A1,1,2)

This will extract the number from the text string. Fill the formula down. It will be in text format. To convert to number format (so you can sum), in column C have:

Code:
=VALUE(B1)

Fill this formula down. Then SUM column C.

Done!
 
Upvote 0
One other thing, to ensure it works properly, find the highest number of hours entry, say four digits (4000 hrs) then the last argument for MID should be 4, for example. Change this argument accordingly
 
Upvote 0
Hello Everybody!
got a small problem... I have a column of numbers which I need to sum. the problem is the numbers have the word "hrs" after them: 49 hrs.
So, when I sum the column, excel comes out with 0, instead of the total for the column.
How do I get excel to ignore the word "hrs", and just add the numbers?
Thanks for the help
Charles
excel 2010
Try this...

Book1
A
1Time
234 hrs.
39 hrs.
45 hrs.
535 hrs.
68 hrs.
720 hrs.
839 hrs.
94 hrs.
1032 hrs.
11Total
12186
Sheet1

Formula entered in A12:

=SUMPRODUCT(--(SUBSTITUTE(A2:A10,"hrs.","")))
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,671
Members
452,937
Latest member
Bhg1984

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