I Have to read a sheet called Map and map all the values of different excel to output headers

Hey i have a sheet called “Map”, in that sheet all the column headers of differnt files are been mapped
Now by basis of that map sheet, i have to map the columns from differnt excel
below is my map sheet

Below is my first file data

below is my 2nd file data

below is my third file data

Below is how the output should be

below is the file
Test.xlsx (17.6 KB)

Kindly help me solve this problem


Can you clarify which column is key, and how to handle if there is unmatched data : for example, Cust Name of dt1 and Name of dt2?


Invoice number is the key it will always be present in all the 3 files

so basically first priority is given to dt1, if the cell in dt1 is blank then fetch values from dt2
if name in dt1 and dt2 is blank then fetch from dt3 for respective invoice number


How about the following sample?

Sample20231022-4aL.zip (15.5 KB)