Counting the number of formulas in a spreadsheet

mapalumbo

New Member
Joined
Jun 3, 2002
Messages
4
I have been tasked with counting the total number of formulas in massive spreadsheets for Sarbanes Oxley purposes.

I have used tools, options, view tab then clicked on formulas. Then I went to each individual sheet and highlighted anything that was not text or a number and used the count function...

Any help, tools or thoughts would be appreciated.

:pray:
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the Board!

I believe that there is a Formula Count function in an add-in or old post, but while I try to dig that up see if this helps any:

<font face=Tahoma><SPAN style="color:#00007F">Sub</SPAN> CountFormulas()
    <SPAN style="color:#00007F">Dim</SPAN> x <SPAN style="color:#00007F">As</SPAN> <SPAN style="color:#00007F">Integer</SPAN>
    
        x = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas).Count
       MsgBox x

<SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

It can be modified to write to a new sheet and give a total of formulas in each sheet if you want.

Smitty
 
Upvote 0
Or if you want to go through alll the sheets:
Code:
Sub test7()
Dim Sht As worksheet

    For Each Sht In Worksheets
        On Error Resume Next
        MsgBox ("Sheet " & Sht.Name & " has " & Sht.Cells.SpecialCells(xlCellTypeFormulas).Count) & " formulas."
    Next Sht

End Sub
Hope that helps!
 
Upvote 0

Forum statistics

Threads
1,203,094
Messages
6,053,507
Members
444,667
Latest member
KWR21

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top