• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to apply Vlookup to table of variable rows

Good evening, annoying your attention, because I need a macro to apply VLOOKUP.
The data to look for are in column G, and the table I'm going to look for are in the range A1: D101.
I look for the Code of column G in the table, and I have to search the data of the other three columns and put them in columns H, I, J respectively. The problem is that both table and column G are variables in rows
Thanks for the attention, greetings Jorge from Peru
 

Attachments

Hi @callao2908

I really don't think you need a macro for that... you could just lookup the values in the entire columns (A:D) or even better, since you are already using a table, just use it instead of referencing a specific range and it will automatically expand range of lookup whenever you add rows to it.

Same thing for the table with the vlookup formula, use a table and then just add the new code below and it will automatically fill the formula for you.

Please see attached
 

Attachments

Back
Top