Joanna has attended:
Excel Advanced course
Colors sumif
hi, does anyone know how to sum up just cells in a particular colour? thanks
RE: colors sumif
Hi Joanna,
Thank you for your post, welcome to the forum;
I think I have got it, but you will need to use VBA;
Press Alt F11 to get into the VBA editor, then insert a module into your workbook. Into this paste the following:
Function SUMIFCOLOUR(TheRange As Range, TheColourCell As Range) As Variant
Dim TempRange As Range
Dim Result
Dim Colour
Application.Volatile
On Error Goto BailOut
Colour = TheColourCell.Interior.Color
For Each TempRange In TheRange
If Colour = TempRange.Interior.Color Then Result = Result + TempRange.Value
Next
BailOut:
SUMIFCOLOUR = Result
End Function
and hopefully you will get the result you need.
Hope this helps