Forum Discussion
Pull member ID number from sheet 2 into sheet one if the name matches?
Patrick2788 I tried to plug the formula in using the actual Sheet Names and columns but it doesn't seem to work for me. I do have a column in between the member ID and first name that I thought would be irrelevant that is a code to turn the member number into a barcode. Here's a bogus name list to give you a more realistic idea. It's possible I was entering the wrong values in the wrong spaces. Whole list is well over 1000 and maybe 30 or less need to be on the first page. Would update the names and -hope- the other column would update as well.
Thank you for the sample workbook.
This is the formula for the sample:
=XLOOKUP(C2:C6&D2:D6,'Whole List'!C2:C11&'Whole List'!D2:D11,'Whole List'!A2:A11,"")
Make certain the ranges specified in the XLOOKUP are of equal length. If one column is longer than another, it will result in a #VALUE error.
- BrattyBlondeJul 25, 2023Copper ContributorPatrick2788 When I plug that in, I get #NAME? as my error.. Not sure what I'm doing wrong.. Does the formula require a 365 subscription?
- Patrick2788Jul 25, 2023Silver Contributor
You'll have to use VLOOKUP-CHOOSE then:
=VLOOKUP(C2&D2,CHOOSE({1,2},'Whole List'!$C$2:$C$11&'Whole List'!$D$2:$D$11,'Whole List'!$A$2:$A$11),2,0)
- BrattyBlondeJul 25, 2023Copper Contributor
Patrick2788 Now I'm just getting a #N/A error.. and when I edit the 11's to be 2000 (just in case - current count is actually 1077 but expected to grow) I get the same error. Clicked the little error <!> button and evaluated each step - the CHOOSE { } portion puts the first member's name from the Whole List over and over with each different member number. Guessing that's why it won't work, but not sure how to make it read the whole list instead of getting stuck on the first one. Just to avoid confusion, I made the formula:
=VLOOKUP(C2&D2,CHOOSE({1,2},'Whole List'!$C$2:$C$2000&'Whole List'!$D$2:$D$2000,'Whole List'!$A$2:$A$2000),2,0)
- SergeiBaklanJul 25, 2023Diamond Contributor
It shall work on Excel 2021 as well.
- BrattyBlondeJul 25, 2023Copper Contributor
SergeiBaklan This is an older machine running 2016 apparently