Vlookup from another sheet in vba

G2K

Active Member
Joined
May 29, 2009
Messages
355
Hi all,

I am trying to insert values into an adjacent cell based upon lookup
values entered using VBA(referecing another workbook- sheet2), i have used other functions in my sheet and it's working like a charm but i am not able to get the vlookup function running till now.

what i actullay want here is -

Range("Y2").Resize(.Range("B65536").End(xlUp).Row - 1, 1).Formula =

Vlookup(Y2,WB name -Master! sheetnumber(2)!range(Y:Z),2,0)

Any Idea ??
 

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.
I think you need single quotes around the sheet name and you dont need the range. What if you try this:

Code:
= "=VLOOKUP(Y2,'WB name -Master! sheetnumber(2)'!Y:Z,2,FALSE)"
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,672
Members
452,937
Latest member
Bhg1984

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