I have a large array of around 15,000 lines. Each output row contains two fields with a meaningless code. I have two mapping tables to translate these codes (see mocked up idea below). The mapping tables need to be contained within the VBA code rather than a separate sheet using VLookup. I could create two arrays and get the code to loop through each mapping table to replace the code with the name but with 15,000 lines within the main array is this the most efficient way? So for example output row 5623 from the main array could have store code E in one field and Code A02 but I need to replace with meaningful names.
Store | Name | Code | Fruit | ||
A | Browns Grocers | A01 | Orange | ||
B | Tesco | A02 | Apple | ||
C | Sainsbury | A03 | Banana | ||
D | Aldi | A04 | Grapes | ||
E | Waitrose | A05 | Strawberries | ||
F | Asda | A06 | Kiwi | ||
G | Ocado | A07 | Raspberries | ||
H | Marks & Spencer |