mladenjevtic
New Member
- Joined
- May 23, 2018
- Messages
- 12
Hello All,
I apologize about the title of this post, it may not be the most fortunate. I have searched through the web, but i can't seem to figure out result of my problem.
What i'm trying to do is next:
Use vlookup in one file and pull data from the other file. Sounds simple enough, but for VBA beginner as I am - not that simple
It's easy to do it with vlookup, but filenames are always different and i want to make this repetitive task automatic. What makes the files unique is that they have certain words always in the filename:
File #1 (where i type the vlookup) has wording in the filename "AR info". File #2 (data file from which i'm looking the info) has words in the filename "File Master".
What i found so far, i can activate those files by looping through open workbooks, but i don't know how to implement this to do a vlookup and cycle through open workbooks using example below:
I'm trying to do this in range "N2" of file #1 .
=VLOOKUP($G2,'[File Master.xlsx]Ready'!$B:$BH,5,0)
I have copied only the one formula, but i have a range of them.
I appreciate any given help!
Thank you!
I apologize about the title of this post, it may not be the most fortunate. I have searched through the web, but i can't seem to figure out result of my problem.
What i'm trying to do is next:
Use vlookup in one file and pull data from the other file. Sounds simple enough, but for VBA beginner as I am - not that simple
It's easy to do it with vlookup, but filenames are always different and i want to make this repetitive task automatic. What makes the files unique is that they have certain words always in the filename:
File #1 (where i type the vlookup) has wording in the filename "AR info". File #2 (data file from which i'm looking the info) has words in the filename "File Master".
What i found so far, i can activate those files by looping through open workbooks, but i don't know how to implement this to do a vlookup and cycle through open workbooks using example below:
Code:
Sub Test()
Dim wb as Workbook
For Each wb In Workbooks
If InStr(1, wb.Name, "File Master", 1) > 0 Then
wb.Activate
Exit For
End If
Next wb
End Sub
I'm trying to do this in range "N2" of file #1 .
=VLOOKUP($G2,'[File Master.xlsx]Ready'!$B:$BH,5,0)
I have copied only the one formula, but i have a range of them.
I appreciate any given help!
Thank you!