Help with this Find code please

B

bob

Even though there are Formulas in the range they are notr being found.

With Range(rngMyRange.Address)
Set rngMyCell = .Find(After:=ActiveCell, LookIn:=xlFormulas)
If (Not rngMyCell Is Nothing) Then
strFirstAddress = rngMyCell.Address
Do
Set rngMyCell = .FindNext(rngMyCell)
If (Mid(rngMyCell.Formula, 1, 1) = "=") Then strData =
rngMyCell.Formula
Loop While Not rngMyCell Is Nothing And rngMyCell.Address <>
strFirstAddress
End If
End With
 
T

Tom Ogilvy

That is because you are not looking for anything. Lookin:=xlformulas
doesn't mean to find any cell with a formula.

If you want all the cells with formulas

Dim rng as Range, cell as Range
set rng = Activesheet.UsedRange.SpecialCells(xlFormulas)

for each cell in Rng

Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top