G
grinning_crow
I'm trying to return the actual range of the cell found using the fin
method, not the value in the cell found.
I recorded the action first and it gave this:
Columns("Y:Y").Select
Selection.find(What:="01/02/2004", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Now I need the "What" parameter to be dependent on the value of a cell
so I changed it to this:
Columns("Y:Y").Select
Selection.find(What:=sheet1.cells(2,1), After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows
SearchDirection:=xlNext, _
MatchCase:=False).Activate
I need the actual RANGE of the cell where the first instance of th
value in sheet1.cells(2,1) to be returned so I can then get the Ro
number to determine where in my list I want to begin my loop (to sav
trawling senselessly through 15000 rows) so I put something like this:
Set MyCell
sheet2.columns(25).find(sheet1.cells(2,1),ActiveCell,xlFormulas).Activate
Without Activate on the end, it just returns the value of the cell, bu
with Activate it errors as Object/With Block var not set etc.
Can anyone tell me how to return the range from the cell found?
Any help would be appreciated... thanks
method, not the value in the cell found.
I recorded the action first and it gave this:
Columns("Y:Y").Select
Selection.find(What:="01/02/2004", After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows
SearchDirection:=xlNext, _
MatchCase:=False).Activate
Now I need the "What" parameter to be dependent on the value of a cell
so I changed it to this:
Columns("Y:Y").Select
Selection.find(What:=sheet1.cells(2,1), After:=ActiveCell,
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows
SearchDirection:=xlNext, _
MatchCase:=False).Activate
I need the actual RANGE of the cell where the first instance of th
value in sheet1.cells(2,1) to be returned so I can then get the Ro
number to determine where in my list I want to begin my loop (to sav
trawling senselessly through 15000 rows) so I put something like this:
Set MyCell
sheet2.columns(25).find(sheet1.cells(2,1),ActiveCell,xlFormulas).Activate
Without Activate on the end, it just returns the value of the cell, bu
with Activate it errors as Object/With Block var not set etc.
Can anyone tell me how to return the range from the cell found?
Any help would be appreciated... thanks