Hi
You don't need any VBA to achieve this.
First Insert Tables on each of your your sheets as I have done.
Then in cells C2, D2 and E2 of sheet Main insert the following formulae and copy down
Formula:
In D2 =IF($A2="","",INDEX(tblInterest,MATCH($A2,tblInterest[Member_num],0),2))
in E2 =IF($A2="","",INDEX(tblActivity,MATCH($A2,tblActivity[Member_num],0),2))
in F2 =IF($A2="","",INDEX(tblLanguage,MATCH($A2,tblLanguage[Member_num],0),2))
This will inert the data for you.
Where the ID does not exist in any of the Tables as a Member_Num you will get a #N/A result
If you want to avoid this, then wrap each of the formula inside an IFERROR() function
Formula:
=IFERROR(IF($A2="","",INDEX(tblInterest,MATCH($A2,tblInterest[Member_num],0),2)),"")
Then to Remove Duplicates, use the inbuilt function in Excel.
Select the whole of your data on sheet Main >Data tab>Remove Duplicates> Select just ID> click OK
I have shown a graphic on the attached workbook which shows this.
Bookmarks