how to automatically add figures having same background color?

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

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
748
Office Version
  1. 2019
  2. 2013
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()?
 

Watch MrExcel Video

Forum statistics

Threads
1,122,957
Messages
5,599,051
Members
414,281
Latest member
Engjamal2021

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