I have to lookup values from a table. I tried different lookups, but they fetch the value of first occurrence only. In my case, it is a bit complicated & is not straight forward. Value that I'm looking for may not be at the first occurrence. Dummy table for illustration only is shown below. Can someone help to find a solution (without VBA) please?
Challenge 1 - I have to find out Name & Account holder from a reference table for each Account # from calling table. Account holder may not be there for all Names. Solution should read Account # in calling table, search all Account # in reference table & fetch the first occurrence of Account holder & corresponding Name.
Challenge 2 - Similar to challenge 1. In this case, I need all values found for each Account #.
Reference table -
Challenge 1 - I have to find out Name & Account holder from a reference table for each Account # from calling table. Account holder may not be there for all Names. Solution should read Account # in calling table, search all Account # in reference table & fetch the first occurrence of Account holder & corresponding Name.
Account # | Name | Account holder |
98765432 | testaccount | test |
12345678 | abc456 | first holder |
Challenge 2 - Similar to challenge 1. In this case, I need all values found for each Account #.
Account # | Name | Account holder |
98765432 | testaccount | test |
12345678 | abc456, abc | first holder, someone |
Reference table -
Name | Account # | Account holder |
abc123 | 12345678 | |
abc456 | 12345678 | first holder |
abc | 12345678 | someone |
xyz | 12345678 | |
xyz789 | 98765432 | |
testaccount | 98765432 | test |
mno765 | 98765432 | |