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
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Khusro" wrote in message
...
Is there any way I can perform calculation on the basis of cell formatting
such as get the sum of highlighted cells