how to automatically add figures having same background color?

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

RCBricker

Well-known Member
Joined
Feb 4, 2003
Messages
1,560
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,
 

Taul

Well-known Member
Joined
Oct 24, 2004
Messages
761
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
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.
 

RCBricker

Well-known Member
Joined
Feb 4, 2003
Messages
1,560

ADVERTISEMENT

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,
 

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
Is there some logic to how the color is being applied? If so, maybe that logic can be built into a rule for SUMIF()?
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,558
Messages
5,832,455
Members
430,136
Latest member
Asir Jefferson

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
Top