Totaling the No. of Hours based on a Data list

Sherri Goudy

New Member
Joined
Apr 13, 2011
Messages
2
I have 2 columns of Data. I want to write a formula that says: Find all the 2-1145 in the column, add them up the hours that corresponds to them and give me a total. I can do this in 2 steps of if it is 2-1145, put the hours in a another column and then total that column. I want to do this in one step, rather than copying the hours to another column and then add them. The course numbers may not always be the same from week to week. The data refers to a course and how much time was spent working on it. There about 75 courses or so, so it could be any of them. They are listed on another spreadsheet and then created a data list from them so it is a drop down that they can be selected from.

Course Hours
2-1145 6
2-1145 3
2-1023 6
1-2376 4
2-1023 2

Thanks so much.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I have 2 columns of Data. I want to write a formula that says: Find all the 2-1145 in the column, add them up the hours that corresponds to them and give me a total. I can do this in 2 steps of if it is 2-1145, put the hours in a another column and then total that column. I want to do this in one step, rather than copying the hours to another column and then add them. The course numbers may not always be the same from week to week. The data refers to a course and how much time was spent working on it. There about 75 courses or so, so it could be any of them. They are listed on another spreadsheet and then created a data list from them so it is a drop down that they can be selected from.

Course Hours
2-1145 6
2-1145 3
2-1023 6
1-2376 4
2-1023 2

Thanks so much.
Try this...

Let's assume your data is in the range A2:B6.

Use a cell to hold the criteria:
  • D2 = some course code like 2-1145
Then:

=SUMIF(A2:A6,D2,B2:B6)
 
Upvote 0

Forum statistics

Threads
1,224,503
Messages
6,179,134
Members
452,890
Latest member
Nikhil Ramesh

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