Hello! Long time reader, first time poster. I have a bit of an issue that needs resolving.
I'm creating a Excel Sheet whereby it pulls data from a variety of other Excel Sheets based on Company names. Each Excel sheet contains multiple contract numbers.
Using someone's code I found here (Apologies for not remembering who) I was able to change Vlookup to Vlookupnth so that it would display multiple matches by changing a number at the end of the formula.
Now I'm trying to make the sheet a little dynamic so that it creates the appropriate amount of returns. What I need to know is what VBA code is required to make it create a Vlookup statement built of changing variables.
Example: =Vlookupnth($A$1,[Path to Excel File],[Range from that file],[Column],[Return#])
I need to be able to have a macro go to specific ranges and input the above statement but with the [Variable]s filled in.
Any help would be greatly appreciated.
Cheers,
SF
I'm creating a Excel Sheet whereby it pulls data from a variety of other Excel Sheets based on Company names. Each Excel sheet contains multiple contract numbers.
Using someone's code I found here (Apologies for not remembering who) I was able to change Vlookup to Vlookupnth so that it would display multiple matches by changing a number at the end of the formula.
Now I'm trying to make the sheet a little dynamic so that it creates the appropriate amount of returns. What I need to know is what VBA code is required to make it create a Vlookup statement built of changing variables.
Example: =Vlookupnth($A$1,[Path to Excel File],[Range from that file],[Column],[Return#])
I need to be able to have a macro go to specific ranges and input the above statement but with the [Variable]s filled in.
Any help would be greatly appreciated.
Cheers,
SF