ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find/replace macro (https://www.excelbanter.com/excel-programming/393112-find-replace-macro.html)

[email protected]

find/replace macro
 
I need a macro that would take a value from worksheet A, switch to
worksheet B, find the value, go back to worksheet A, move over two
columns, take the value in that column, switch back to worksheet B and
paste. repeat until at the end of the column in worksheet A. Is this
possible in VB?

I haven't coded in a while, and have never used VB, so I'm not really
sure where to start.


[email protected]

find/replace macro
 
On Jul 11, 9:03 am, wrote:
I need a macro that would take a value from worksheet A, switch to
worksheet B, find the value, go back to worksheet A, move over two
columns, take the value in that column, switch back to worksheet B and
paste. repeat until at the end of the column in worksheet A. Is this
possible in VB?

I haven't coded in a while, and have never used VB, so I'm not really
sure where to start.


Try using a VLOOKUP first. The function will look something like the
following:

=VLOOKUP(B2,[WorksheetA]Sheet1!$A$2:$C$8,3,FALSE)

Matt



All times are GMT +1. The time now is 05:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com