Sum based on criterias that belongs to a group? Excel file shared

Camel123

Board Regular
Joined
Jun 5, 2018
Messages
186
Hi,

Anyone who can help me solve the described issue please? Please see uploaded images in thread or download the excel file:

In sheet 1,
col. B= machine numbers, col. C= machine hours spent

In sheet 2,
col. B= which machine group each machine number belong to, col. C= all machine numbers

I want a formula to do the following if "true"= if col.B (sheet 1) is equal to a machine group, then sum all the machine hours in col. C (sheet 1) for all machines that belong to that group, based on the grouping in sheet 2,.
 

Attachments

  • 1.PNG
    1.PNG
    14.1 KB · Views: 5
  • 2.PNG
    2.PNG
    15 KB · Views: 5

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Both tables on the same sheet for convenience, but try:

Book2
ABCDEF
1
2MachineHoursMachine GroupMachine
3A1901100Grp1A1901
4A2032200Grp1A2032
5A3790300Grp1A3790
6B4516400Grp2B4516
7B3311500Grp2B3311
8Grp1600
9Grp2900
10
Sheet5
Cell Formulas
RangeFormula
C8:C9C8=SUMPRODUCT($C$3:$C$7,--(COUNTIFS($E$3:$E$7,B8,$F$3:$F$7,$B$3:$B$7)>0))


You should be able to see how to change the ranges for your sheet.
 
Upvote 0
Both tables on the same sheet for convenience, but try:

Book2
ABCDEF
1
2MachineHoursMachine GroupMachine
3A1901100Grp1A1901
4A2032200Grp1A2032
5A3790300Grp1A3790
6B4516400Grp2B4516
7B3311500Grp2B3311
8Grp1600
9Grp2900
10
Sheet5
Cell Formulas
RangeFormula
C8:C9C8=SUMPRODUCT($C$3:$C$7,--(COUNTIFS($E$3:$E$7,B8,$F$3:$F$7,$B$3:$B$7)>0))


You should be able to see how to change the ranges for your sheet.
Thank you, will try it tomorrow at work! :)
 
Upvote 0

Forum statistics

Threads
1,214,960
Messages
6,122,479
Members
449,088
Latest member
Melvetica

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