# Conditional sum

February 17, 2009 at 04:25:22
Specs: Windows XP
 hi all, i have problem in Excell2003. We have 3 coloum namely A,B,C. Coloum A have Code of product , B Have Colour of product, C have a Numver of product. My problem is this , How to sumup for all A & B in C.

See More: Conditional sum

#1
February 17, 2009 at 06:07:44
 I do not know how to SUM a color.Perhaps I do not understand the question?Can you provide a little more specific information?Bryan

Report •

#2
February 17, 2009 at 06:51:47
 I agree that we need more info, but...You can SUM cells by Fill Colors by using the ColorIndex property in VBA. However, if the color is caused by Conditional Formatting, it's a little tougher. For Fill Colors, here's a simple example.```Sub ColorSummer() 'To Sum the Red cells For Each cell In Range("A1:A10") If cell.Interior.ColorIndex = 3 Then RedSum = RedSum + cell.Value Next Range("B1") = RedSum End Sub ```For a lot more detail, see here:http://www.ozgrid.com/VBA/sum-count...and here:http://www.cpearson.com/excel/color...For a thread on working with colors caused by Conditional Formatted, see here: (Note: read the entire thread to make sure you cover all issues)http://www.mrexcel.com/forum/showth...

Report •

#3
February 17, 2009 at 19:51:10
 problemCol A Col B Col C Col D201 777 Blk 100 203 888 red 200201 777 grn 300201 888 blk 100i wan to sum up for all value for condition if col A has 201 and cob B have 777. here answer is 400.

Report •

Related Solutions

#4
February 18, 2009 at 04:14:36
 `=SUMPRODUCT(--(\$A\$1:\$A\$5=201),--(\$B\$1:\$B\$5=777),(\$D\$1:\$D\$5))`Obviously you'll need to change the size of the range

Report •