Counting formula

B

Bob Phillips

Sub NumFormulae()
Dim oCell as Range
Dum cNumFormulae As Long

For Each oCell In Activesheet.UsedRange
If oCell.HasFormula Then
cNumFormulae = cNumFormulae + 1
End If
Next oCell
MsgBox cNumFormulae
End Sub

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
P

Peo Sjoblom

Press F5, select special, select formulas and press enter, right in the
statusbar to the right and select count
 
A

awakening2lite

Showing my ignorance, here. I do not understand this. I do not work in VB.
But, thank you for trying to help.
 
A

awakening2lite

What am I doing wrong. I tried entering F5 and followed instruction in both
clicking a cell and clicking the status bar but I do not get any result.
 
P

Peo Sjoblom

start by doing this, in the statusbar at the bottom right click where you
see NUM, right click then select count

then do F5, special and formulas, that will select all formulas in the
active sheet and at the bottom right you should see the count of them
 
A

awakening2lite

A Million Thanks, Peo! It worked perfectly!

Peo Sjoblom said:
start by doing this, in the statusbar at the bottom right click where you
see NUM, right click then select count

then do F5, special and formulas, that will select all formulas in the
active sheet and at the bottom right you should see the count of them
 
Top