You will need a UDF, the following will sum every cell if it has ANY color
shading (will ignore only the cells with no shading). Then, to implement,
use the following in any cell on your spreadsheet =SumHighlighted(A1100)...
change reference to fit your data.
Function SumHighlighted(rng As Range)
For Each rng In rng
If Not (rng.Interior.ColorIndex = xlNone) Then
Sum = Sum + rng
End If
Next
SumHighlighted = Sum
End Function
If the highlighting is from selecting the cells, then the sheet will sum
them in the bottom right side of the worksheet. Right click in the bottom
margin below any tool bars you have at the bottom and select SUM. Select
the cells and see Sum=nnn.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.