Copy and Find
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. |
Copy and Find
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. -----Original Message----- 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. . |
All times are GMT +1. The time now is 05:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com