Can you use sumif or V lookup to total elements in one column based on values in another column?

Jjagz

New Member
Joined
Sep 23, 2017
Messages
7
Good morning, I am trying to use sumif and/or vlookup to solve my problem in my worksheet and there are too many variables for my expertise. The data is set up like this:

[TABLE="width: 343"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 4"][TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD] A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[/TR]
[TR]
[TD]Eng Hours
[/TD]
[TD]Survey Hours
[/TD]
[TD]Rate
[/TD]
[TD]Total
[/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD]0
[/TD]
[TD]200
[/TD]
[TD]1600
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]5[/TD]
[TD]150
[/TD]
[TD]750
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD][/TD]
[TD]125
[/TD]
[TD]250
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]2
[/TD]
[TD]190
[/TD]
[TD]380

[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]7
[/TD]
[TD][/TD]
[TD]2980
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]
I want to create a formula that will total column D for Eng hours and for Survey Hours on another sheet

Eng Total = $1850.00
Survey Total $1130.00

Is this possible to do the way my budget worksheet is already set up?

Thanks in advance!

Jjagz

[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Your column D shows the total per record, regardless Eng or Survey... Such is confusing in light of what you seem to be looking for...

Let A:C of Sheet1 house the data.

In A1 of Sheet2 enter:

Eng

In A2 of Sheet2 enter:

Survey

Now in B1 of Sheet2 enter and copy down:

=SUMPRODUCT(Sheet1!$C$2:$C$6,INDEX($A$2:$B$6,0,MATCH(A1&"*",Sheet1!$A$1:$B$1,0)))

Note that the table does not list a rate in C6.

Hope this helps.
 
Upvote 0
Thank you for your response! I was hoping to avoid recreating my budget worksheet - After more searches, I discovered it actually works to use a simple if/sumif - I just wasn't doing it correctly.

=IF(B6="Eng",SUMIF('Budget Hours by Phase'!$D$7:$D$28,">0",'Budget Hours by Phase'!$G$7:$G$28),SUMIF('Budget Hours by Phase'!$E$7:$E$28,">0",'Budget Hours by Phase'!$G$7:$G$28))

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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