H
HSalim[MVP]
Hi,
I was given a large spreadsheet - full of formulas.
(Most of those formulas are identical - copied down a range of cells.)
I need to extract each "unique" formula, and my first attempt was to convert
the formula to a string and copy it to an empty sheet, then to analyze it.
(See code below.)
Is there a better way to get the formulas used in a worksheet?
Thanks for your help.
Regards
Habib
------------------------------------
For colz = 4 To 76
Application.StatusBar = "Reading Col " & colz
For rowz = 2 To 60957
Worksheets("Sheet1").Cells(rowz, colz).Select
If Left(ActiveCell.Formula, 1) = "=" Then
Worksheets("Sheet2").Cells(rowz, colz).Value = "'" &
CStr(ActiveCell.Formula)
End If
ActiveCell.Offset(1, 0).Select
Next
ActiveCell.Offset(0, 1).Select
Application.StatusBar = "Reading Col " & colz
Next
Application.StatusBar = "Done"
I was given a large spreadsheet - full of formulas.
(Most of those formulas are identical - copied down a range of cells.)
I need to extract each "unique" formula, and my first attempt was to convert
the formula to a string and copy it to an empty sheet, then to analyze it.
(See code below.)
Is there a better way to get the formulas used in a worksheet?
Thanks for your help.
Regards
Habib
------------------------------------
For colz = 4 To 76
Application.StatusBar = "Reading Col " & colz
For rowz = 2 To 60957
Worksheets("Sheet1").Cells(rowz, colz).Select
If Left(ActiveCell.Formula, 1) = "=" Then
Worksheets("Sheet2").Cells(rowz, colz).Value = "'" &
CStr(ActiveCell.Formula)
End If
ActiveCell.Offset(1, 0).Select
Next
ActiveCell.Offset(0, 1).Select
Application.StatusBar = "Reading Col " & colz
Next
Application.StatusBar = "Done"