Set ActiveCell

kckay

Board Regular
Joined
Nov 8, 2010
Messages
134
I am doing a search of a value; once found, I need to search a different value AFTER the cell result of the first search.

How do I set the .find command to deal with this?

After:=(previous found field) ?
After:=ActiveCell ?

If ActiveCell, how do I set the result of the previous search to be the ActiveCell?
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
It might be worthwhile posting your code. With the use of 'activecell', I'm guessing you're using select, which you may not need to do.

for instance

Code:
set f = cells.find(what:="my_criteria")
set g = cells.find(what:="my_other_criteria",after:=f)
Findnext would be useful if you're looking for the same thing after your first search, but your question suggests that isn't the case.
 
Upvote 0
The way I understand the .FindNext is it will search for the same parameters as the original .Find. I am looking to search for a different value than the original .Find parameters - starting from where the original .Find resulting cell was located.
 
Upvote 0
The way I understand the .FindNext is it will search for the same parameters as the original .Find. I am looking to search for a different value than the original .Find parameters - starting from where the original .Find resulting cell was located.
Have you read post #3?
 
Upvote 0
Weaver, cool info. I hacked my way through, but know my solution is not elegant. I will try modifying to what you show. I was replying to the second post when you posted.
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top