Sum of Highlighted values

  • Thread starter Thread starter Khusro
  • Start date Start date
K

Khusro

Is there any way I can perform calculation on the basis of cell formatting
such as get the sum of highlighted cells
 
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.
 
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
 
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?
 
Back
Top