Find variable cell text in another range

G

Guest

I am developing a macro that needs to find whatever text is in cell A33 of
sheet1 in a range on sheet2. Cell A33 text changes depending on the
selection made from a userform.

I have figured out a very, very long winded IF, ELSE IF code that uses all
possible values that could be in cell A33 but am hoping there is a simpler
way to do it.

I have trawled through Excel and Excel VBA help and cant find what I need.
 
N

Niek Otten

Use the macro recorder. Copy A33, Edit>Find, Paste in the Find what box, do
what you want to do with it.
Then look at the generated code and change to your needs.
 
G

Guest

That was perfect, thanks.

Niek Otten said:
Use the macro recorder. Copy A33, Edit>Find, Paste in the Find what box, do
what you want to do with it.
Then look at the generated code and change to your needs.
 

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