Thread: count formulas
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default count formulas

Sub Macro1()
Dim r As Range
Dim c As Integer
For Each r In Selection
If r.HasFormula Then
c = c + 1
End If
Next
MsgBox (c)
End Sub

Select the range on the worksheet and then run the macro
--
Gary's Student


"Sam" wrote:

What vba procedure can I use to count the number of formulas in a given range?