View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
mrice mrice is offline
external usenet poster
 
Posts: 1
Default Searching a spreadsheet


You might try a macro which scans the sheets sequentially looking for
formulae. Add a new sheet and call it "New sheet" and try the
following...

Sub Test()
For Each Sheet In Sheets
Formulae = True
On Error GoTo NoFormulae
For Each Cell In Sheet.Cells.SpecialCells(xlCellTypeFormulas, 23)
If Formulae = True Then
Sheets("New sheet").Cells(65536, 1).End(xlUp).Offset(1, 0)
= Sheet.Name
Sheets("New sheet").Cells(65536, 1).End(xlUp).Offset(0, 1)
= Cell.Address
Sheets("New sheet").Cells(65536, 1).End(xlUp).Offset(0, 2)
= Cell.FormulaR1C1
End If
Next Cell
Next Sheet
Exit Sub
NoFormulae:
Formulae = False
Resume Next
End Sub


This will give the location of all the formulae in the workbook.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=564482