Sumif from multiple columns without helper column

angeloudaki

New Member
Joined
Jul 7, 2015
Messages
46
Hi.

I have been looking into this but (again) getting very confused as there is a lot of information that just doesn't do what I want - it seems.

Basically, I have two worksheets in one workbook; one sheet holds the variable data, the other holds the calculations (I do not yet know how to use Pivot tables but I am awaiting a session). Simplified example:
  • I have up to three staff members teaching on any one module over three sessions
  • Each staff member has variable payable teaching hours logged
My situation:
  • the session is 3hrs long
  • Session one - there are 3 tutors each teaching for one hour (total payable teaching hours = 3)
  • Session two - there are 3 tutors each teaching for the full 3hrs each (total payable teaching hours = 9)
  • Session three - there are 3 tutors each teaching different hrs (total teaching hours = 7)

VARIABLE DATA SHEET (VAR):
A
B
C
D
E
F
G
H
I
1
MODULE 1
Session length
Staff1Staff1 hrs
Staff2Staff2 hrs
Staff3Staff3 hrs
Total module
teaching hours
2
Session 13
John1Bridget1Emma13
3
Session 23Amy3
John3Emma39
4
Session 33Bob1Emma3Bridget37

<colgroup><col style="width:48pt" span="9" width="80"> </colgroup><tbody>
</tbody>

CALCULATION SHEET (CAL):

ABCDE
1 Teaching hours 1Teaching hours 2Teaching hours 3Total payable hrs
2Amy3003
3Bob1001
4Bridget0134
5Emma0347
6John1304

<colgroup><col span="2"><col span="2"><col><col></colgroup><tbody>
</tbody>

<colgroup><col style="width:48pt" span="2" width="80"> </colgroup><tbody>
</tbody>
To do this I have three helper columns and in each column I use the (equivalent) formula: =SUMIF('VAR'!C:C,A2,'VAR'!D:D) then hide the helper columns and sum the values returned (above). I believe this translates as if data in (VAR)C:C matches (CAL)A2 then sum the corresponding values in (VAR)D:D.

I don't want to use helper columns. So, essentially what I want to do is the same but calculating data in one go i.e. (CAL)C:C E:E G:G matches (CAL)A2 then sum the corresponding values in (VAR)D:D F:F H:H........ does that make sense??
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Formula for CAL!E2 (or CAL!B2 if you want to move everything to the left):

=SUMIF('VAR'!$C:$C,$A2,'VAR'!$D:$D)+SUMIF('VAR'!$E:$E,$A2,'VAR'!$F:$F)+SUMIF('VAR'!$G:$G,$A2,'VAR'!$H:$H)

It's basically what you have already; you just need to put "+" signs between the three formulas.

WBD
 
Upvote 0
Or maybe this...


A
B
1
Total Payable Hrs​
2
Amy​
3​
3
Bob​
1​
4
Bridget​
4​
5
Emma​
7​
6
John​
4​

Formula in B2 copied down
=SUMIF(VAR!C:G,A2,VAR!D:H)

Hope this helps

M.
 
Upvote 0
Wowsers that was easy then! *feeling foolish* thank you so much! *hands you a box of chocolates each*
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,952
Members
449,198
Latest member
MhammadishaqKhan

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