I need to Search all the excel sheets that contains some kind of formula. Is there any method that can give this information.
Printable View
I need to Search all the excel sheets that contains some kind of formula. Is there any method that can give this information.
To get the cell that contains formula, you can use the following two properties in Excel VBA
1. .HasFormula
2. .SpecialCells(xlCellTypeFormulas)
.HasFormula will give True or False depending on the availability of formulas whereas .SpecialCells(xlCellTypeFormulas) can be used to select all the cells that contain formula
orCode:cells.SpecialCells(xlCellTypeFormulas).Select
Hope this helps...Code:Set rng = cells.SpecialCells(xlCellTypeFormulas)
For each Cll in Rng
'~~> Your code for each cell containing formula
Next
Thanks a lot for quick solution.