View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
James[_47_] James[_47_] is offline
external usenet poster
 
Posts: 10
Default Simple Vlookup Loop

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)