Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 -- Regards, Tom Ogilvy wrote in message ... 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks,
That worked, and did what I was trying to do bob On Wed, 17 Dec 2003 21:16:59 -0500, "Tom Ogilvy" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to find code | Excel Discussion (Misc queries) | |||
Find last row code | Excel Discussion (Misc queries) | |||
VBA code 'find next' | Excel Programming | |||
Find Code | Excel Programming | |||
VBA Code to FIND | Excel Programming |