Hello Everyone!
Background Information:
I get updates for SKU information on a daily basis (see worksheet - Changes_List). However, the information does not match my data record layout. I create a separate worksheet (Unique_Chgs) to build the update record for each SKU. I have figured out how to identify the unique SKU records (viewing other posts in the forum - thanks!), but I am having difficulty trying to find ALL the updates for each SKU.
Problem
The worksheet (Unique_Chgs) I created to build SKU update record currently is using the function VLOOKUP to find the different information (ADDRESS, BRAND, DESCRIPTION, etc.) that needs to be updated for the SKU. I created a column H (heading - Trimmed) in the "Changes_List" worksheet because I found there was a hidden "non-breaking space” in the values in column D (titled - Changed Field).
I used the following formula to remove the "non-breaking space" in the value so I can successfully find the change field in a VLOOKUP:
Cell Ref Cell Formula
H2:H23 TRIM(CLEAN(SUBSTITUTE(D2, CHAR(160),"")))
where D2 referrences the value in Changed Field column.
Below is the formula I have coded in column E (title - Addr) in the Unique_Chgs worksheet.
=IF(C2<>"", IF(VLOOKUP(C2,Changes_List!A:G,7, FALSE)="ADDRESS", TRIM(VLOOKUP(C2,Changes_List!A:G,5, FALSE)), ""), "")
In the first part of the VLOOKUP formula I us column 7 (title - Trimmed) which is the sanitized value of the Field Changes. The second part of the VLOOKUP formula does not use the condition statement ="ADDRESS". Therefore the formula only works for the first occurance of a SKU change. The formula works fine if there is only one update/change for a SKU.
I use the same VLOOKUP in column F (title - Brand) to locate the "BRAND" changes for a SKU. However, since the VLOOKUP function already found a corresponding row previously the function returns "blank" for the "BRAND" changes.
My ideal results for the first SKU (01-0107260) record in the Unique_Chgs worksheet would look like this:
Col C Col E Col F Col G Col H ....
01-0107260 Largo, FL 33777 ANS International 12 Per case - 12 Fl Oz (355ml) ......
From reading other posts, I know there is a way to solve what I am trying to achieve using the INDEX and Match functions, but I am not familiar using these functions and not sure how to reference the cells and ranges to provide the results I am seeking.
I have attached the workbook if anyone would be interested in showing me how to achieve this task. i would greatly appreciate any thoughts or suggestions from you "guru's" out there. Thanks for your assistance.
Bookmarks