EXCEL Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a Macro where the cursor goes to a specific cell and
then the FIND dialog box will appear. When I try to write the macro and
press CTRL F then the computer is locked until I close the box.
I assume I have to write FIND or CTRL F in code, anyone know how?
Thanks
George Lawshe
(e-mail address removed)
 
why not simply use. BTW, why do you want to SELECT?

Sub gotoandfind()
ans = InputBox("what to find")
MsgBox Range("a2:a20").Find(ans).Address
Range("a4").Select
End Sub
 
Thanks for the help Don. I do not know whar you mean by BTW. Do I write the
code below in as a Macro?
Thanks
George
 
BTW= "By the Way" The question is why would you want to select from the
active cell all the rows to the end?
Just copy/paste to a macro module and run from there or assign a
button/shortcut.
 
Don
I guess I misstated my challenge. If I am working on a large spreadsheet
and I want to a specific address . I could Press Ctrl F and type in my search
criteria and press NEXT.
However, if I had a macro that I could press Ctrl Z and it would take the
cursor to the top row of the column I need (always the same column) and then
drop down the FIND dialog box. This way it will search by column and since
it is in the correct column it will be faster. Thinking about it, I guess if
the macro would only search that single column it wouldbe faster. The
criteria I am searching may appear in another coulmn but that does not help
me.
Thanks for your help, I like the BTW
George
 
The macro that I gave you will ask you what to search for and, in THIS case,
search in a2:a20. Modify to suit your needs. It will tell you the address of
what you were searching for.
If I can be of further help, post back.
 

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

Back
Top