Need macro with vlookup formula to transfer data 1 cell to the right

arroldm

New Member
Joined
Feb 24, 2011
Messages
1
I need a macro where I use the vlookup formula to get data from a different sheet, where multiple values may be retrieved, then inserting data into the next cell over (to the right) creating a running list. Eg:
Lookup value is in column a. Retrieve data and put into column b. When more data is retrieved, data in column b moves over to column c and newest data is held in column b. Either done automatically as a value is retrieved in vlookup, or alternatively, if the macro has to be manually run (eg assign to a button), when data retrieved has no value, cells are not moved to the right. To help you understand better, I am looking up a result (vlookup by location in col a) and I want to keep the most recent result in column b, moving data to the right whenever a new result is retrieved. I hope I explained this ok.. If not, just let me know and I'll c if I can give u a visual example. Hope u can help!
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

Forum statistics

Threads
1,216,385
Messages
6,130,314
Members
449,572
Latest member
mayankshekhar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top