Simple Vlookup Loop

J

James

Hi Everyone,

Can anyone help me with looping through the worksheets with simple
vlookup?

- I have this workbook called "A" which has 10 different tabs

- Lookup file: C:\documents\ABC.xls
- Lookup range: A1:B30
- Lookup value: Workbook A, Everytab, Column C (non-empty cells)


i.e. Vlookup(Cx, Lookup range, 2, false) for every worksheet

I got up to below so far and totally lost what I have to do after
this :(

Can anyone help please?

Thank you for your help in advance.


LookFName = "C:\Documents\ABC.xls
Set Lookbk = Workbooks.Open(Filename:=LookFName)
Set myRng = Lookbk.Sheets("Sheet1").Range("A1:B30")


For Each Ws in Sheets


res = Application.VLookup(myVal, myRng, 2, False)
 

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

Top