Sum of Highlighted values

K

Khusro

Is there any way I can perform calculation on the basis of cell formatting
such as get the sum of highlighted cells
 
M

Mike H

How are the cells highlighted, is it conditional formatting or a fill colour?
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
D

Don Guillett

Sub sumselection()'non-contiguous assign to button or shape
MsgBox Application.Sum(Selection)
End Sub

'below ONLY if a contiguous selection.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Application.Sum(Selection)
End Sub
 
C

CellShocked

I probably misread the post but this may still be useful


He does know about the stats given on the status bar at the bottom of
the currently selected widow, right?
 

Ask a Question

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.

Ask a Question

Top