Copy and Find

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi. I am relatively new to VB ...

Part of my subroutine needs to accomplish the following:

1. Copy the activecell in file1 to memory.
2. Go to file2 (already open) and search for and find the
same value.
3. Move down 1 cell from that location

Any help?

Thanks,
Mike.
 
Try this:

Memory1 = ActiveCell.Value
Workbooks(file2).Activate
Cells.Find(What:=Memory1, After:=ActiveCell, _
LookIn:= xlValues, LookAt:=xlPart, _
SearchOrder:=xlByRows).Select
ActiveCell.Offset(1,0).Select

You may want to change xlValues to xlFormulas if the Find
does not work. You also may want to change xlPart to
xlWhole if you start finding things that contain what you
are looking for but are not exactly the item you want.
 

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

Similar Threads


Back
Top