how to automatically add figures having same background color?

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
try this

Code:
=SUMIF(B2:B13,"Yellow",A2:A13)

I wrote this real quick and forgot to mention that this will require you to create another column with the name of the color. AFAIK there is no formula for counting background colors with out VBA.

thanks,
 
Upvote 0
Hi,
Apart from using VBA, the only work-around I can think of is to use SUBTOTAL

Code:
=SUBTOTAL(109,A2:A20)

Add the AUTOFILTER to the column header and filter by Colour (font or background)

"Subtotal 109" will add up the numbers displayed.

Paul.
 
Upvote 0
Hi,
Apart from using VBA, the only work-around I can think of is to use SUBTOTAL

Code:
=SUBTOTAL(109,A2:A20)

Add the AUTOFILTER to the column header and filter by Colour (font or background)

"Subtotal 109" will add up the numbers displayed.

Paul.

I thought about filtering and totaling by color, but the OP never mentioned using filter. This is a real good solution if you only need to total one color.

Thanks,
 
Upvote 0
Is there some logic to how the color is being applied? If so, maybe that logic can be built into a rule for SUMIF()?
 
Upvote 0

Forum statistics

Threads
1,213,562
Messages
6,114,326
Members
448,564
Latest member
ED38

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