Soniya
the code below will count the cells with constants. (Not formulas, blank,
etc) in a selection
Sub CountConstants()
Dim lConstantCount As Long
lConstantCount = Selection.SpecialCells(xlCellTypeConstants).Count
MsgBox "There are " & lConstantCount & " Cells with constants in the
selection"
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)