Thread: count formulas
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default count formulas

Hi Sam,

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


Try:
'=============
Public Sub Tester()
Dim rng As Range
Dim i As Long

Set rng = Range("A1:D50") '<<==== CHANGE

On Error Resume Next
i = rng.SpecialCells(xlCellTypeFormulas).Count
On Error GoTo 0

MsgBox i

End Sub
'<<=============


---
Regards,
Norman

"Sam" wrote in message
...
What vba procedure can I use to count the number of formulas in a given
range?