Sum by colour and other criteria

Goddess

Board Regular
Joined
Dec 3, 2015
Messages
94
Office Version
  1. 2019
Platform
  1. Windows
Hi,

1636356073867.png


I have this table, where row 1 are names which will be grouped (based on the colour of the cell). I will need a subtotal based on the groups and then the grand total.

For example:
Subtotal 1 : B6=B3+D3+F3, C6=C3+E3+G3, etc

Subtotal 2 : F6=H3+J3, F7=H4+J4, etc

Same goes for Subtotal 3 and 4

Is there anyway to sum based on the colour, or maybe name the group as "Group1", Group 2", etc and then create a formula to sum accordingly? The groups are constantly changing.

Thanks!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi Goddess(!)

Not sure if you found a result for this yet but you can use SUMIF if the groups have the same names for each colour. To get the different results I just offset the range for cell C6, see below images.

In cells B6 & F6 =SUMIF($B$1:$O$1,A$6,$B$3:$O$3)
In cells C6 & G6 =SUMIF($B$1:$O$1,A$6,$C$3:$P$3)
In cells B7 & F7 =SUMIF($B$1:$O$1,A$6,$B$4:$O$4)
In cells C7 & G7 =SUMIF($B$1:$O$1,A$6,$C$4:$P$4)

1636600834901.png

1636600857934.png


Hope this helps

Steven
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,666
Members
449,248
Latest member
wayneho98

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