PDA

View Full Version : Dynamic Lookup Function to match the data in two sheet and copy in one sheet



bunty
02-02-2015, 12:41 PM
Hi,

With lots of hope writing my query and looking for help from all the experts:

Here I am trying to implement the excel vlookup function into my vba command.There are two sheet (Sheet1 and sheet 2) and both sheets are dynamic.
using Vlookup i am looking the name column of sheet1 to sheet2 name column and matching value from sheet2 (column name team) needs to be copy to sheet 1 (column :Team).
using the vlookup function: VLOOKup(E2,SHEET2!A:B,2,False) and using record macro.This is working fine for static records.But don't know how to do it for dynamic set of records.
Please find the set of sample records with below query:
Q1. I am trying to create pivot table and the code is working find.But when I have included the vlookup function to copy the data from sheet 2 to sheet 1 and running getting run time error to create pivot table.
Q2.Please help me to correct this code.

Thanks a lot...

bunty
02-03-2015, 08:53 AM
Hi All,

Could you please help me to resolve this issue.

Thanks,