Need Help with Lookup....

smalik

Board Regular
Joined
Oct 26, 2006
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I think I need a lookup formula but I can't seem to figure out. Even with nested lookup, I can't get the results I am looking
I will try to explain as best as I can

the source code file has four columns:
Producer Code0,
Producer Code1,
Producer Code2, &
Producer Code3

I am trying to transfer this data into a new system where Producer Code 0 can only have the house Account codes

The House Account code is either "Houeb1" or "Houpe1"

However, in the source system data, these house account codes are found in any of the four Producer Code columns.

Is there a way I can find the house account codes from the source system file and place it in the Producer Code0 field in a different tab? Not only that if I move the house code to the first filed, I need to move the other codes into the following producer code columns. For example,

if the HOUEB1 code from source file is found in Producer Code0, it should stay in Produce Code0 filed in the destination
if the HOUPE1 code is found in Producer Code1, and there is another Code in Producer Code0 filed. The new mapping is HOUEB1 in ProduceCode0 and the other code in ProducerCode1 field
if the HOUEB1 code is found in Producer Code2, and there are other codes in Producer Code0, & Producer Code3 fields, the new mapping should be HOUEB1 in ProducerCode0 field followed by other codes in the ProducerCode1, & 2 fields
and so and so forth.


Not only that there are "Commission Percent" field for each Producer Code field.

Once I move the code, I need to align the Commission Percent field as well. For example, ProduceCode0 gets mapped with Commission Percent0 field

I will be mapping this for 55K+ rows. This will be done three time over the next two months. Preview-1, Preview-2, and final production transfer so any help is greatly appreciated.

Not sure if was able explain my dilemma, so please feel free to ask questions. I would love to get a formula as I don't know anything about macros but if this can only be done via a macro, I would need help adding the code to my file.

I have downloaded xl2bb addin and pasted the Excel.

Thanks for the help in advance.


SplitMerge.xlsx
ABCDEFGHIJKLMNOP
1Producer Code 0Producer Name 0Producer Type 0Producer Code 1Producer Name 1Producer Type 1Producer Code 2Producer Name 2Producer Type 2Producer Code 3Producer Name 3Producer Type 3Commission Percent 0Commission Percent 1Commission Percent 2Commission Percent 3
2HOUEB1House Employee BenefitsPPAY0.0000@
3HOUPE1House PersonalPPAY0.0000@
4HOUEB1House Employee BenefitsPPAY0.0000@
5HOUEB1House Employee BenefitsPPAY0.0000@
6HOUEB1House Employee BenefitsPPAY0.0000@
7HOUEB1House Employee BenefitsPPAY0.0000@
8HOUEB1House Employee BenefitsPPAY0.0000@
9HOUEB1House Employee BenefitsPPAYPAYKR1Kristi PaynePPAY0.0000@10.0000@
10HOUEB1House Employee BenefitsPPAYPAYKR1Kristi PaynePPAY0.0000@0.0000@
11HOUEB1House Employee BenefitsPPAY0.0000@
12HOUEB1House Employee BenefitsPPAY0.0000@
13BRETI1Tim BresnahanPPAY18.0000@
14BRETI1Tim BresnahanPPAY18.0000@
15BRETI1Tim BresnahanPPAY18.0000@
16CUNMI1Michael CunninghamPPAY20.0000@
17CUNMI1Michael CunninghamPPAY20.0000@
18CUNMI1Michael CunninghamPPAY20.0000@
19KANCH1Chris KanePPAY30.0000@
20KANCH1Chris KanePPAY0.0000@
21KANCH1Chris KanePPAY40.0000@
22KANCH1Chris KanePPAY15.0000@
23KANCH1Chris KanePPAY0.0000@
24KANCH1Chris KanePPAY0.0000@
25HOUEB1House Employee BenefitsPPAY0.0000@
26HOUEB1House Employee BenefitsPPAY0.0000@
27HOUEB1House Employee BenefitsPPAY0.0000@
28HOUEB1House Employee BenefitsPPAY0.0000@
29HOUEB1House Employee BenefitsPPAY0.0000@
30HOUEB1House Employee BenefitsPPAY0.0000@
31DONGR1Gregory C. DonnellyPPAY30.0000@
32DONGR1Gregory C. DonnellyPPAY30.0000@
33DONGR1Gregory C. DonnellyPPAY30.0000@
34HOUPE1House PersonalPPAY30.0000@
35FEDEGRO-01The Fedeli GroupBPAYAPBENEF-01AP Benefit Advisors, LLCBPAYHOUEB1House Employee BenefitsPPAY83.0000@15.0000!0.0000!
36FEDEGRO-01The Fedeli GroupBPAYAPBENEF-01AP Benefit Advisors, LLCBPAYHOUEB1House Employee BenefitsPPAY83.0000@15.0000!0.0000!
37FEDEGRO-01The Fedeli GroupBPAYAPBENEF-01AP Benefit Advisors, LLCBPAYHOUEB1House Employee BenefitsPPAY83.0000@15.0000!0.0000!
38FEDEGRO-01The Fedeli GroupBPAYAPBENEF-01AP Benefit Advisors, LLCBPAYHOUEB1House Employee BenefitsPPAY83.0000@15.0000!0.0000!
39FEDEGRO-01The Fedeli GroupBPAYAPBENEF-01AP Benefit Advisors, LLCBPAYHOUEB1House Employee BenefitsPPAY83.0000@15.0000!0.0000!
40HOUEB1House Employee BenefitsPPAY0.0000@
41HOUEB1House Employee BenefitsPPAY0.0000@
42KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY40.0000@30.0000@
43KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY30.0000@30.0000@
44KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY30.0000@30.0000@
45KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY30.0000@30.0000@
46KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY30.0000@30.0000@
47KANCH1Chris KanePPAYHOUEB1House Employee BenefitsPPAY30.0000@30.0000@
48SMIJO2Jon SmithPPAYDEGKI1Kim DeGiralomoPPAY18.0000@12.0000@
49SMIJO2Jon SmithPPAYDEGKI1Kim DeGiralomoPPAY18.0000@12.0000@
50DONGR1Gregory C. DonnellyPPAYZIMAN1Anthony ZimbardiPPAYBLACH1Chris BlackPPAY10.0000@10.0000@20.0000@
51ZIMAN1Anthony ZimbardiPPAYBLACH1Chris BlackPPAY20.0000@20.0000@
52ZIMAN1Anthony ZimbardiPPAYBLACH1Chris BlackPPAY20.0000@20.0000@
53ZIMAN1Anthony ZimbardiPPAYBLACH1Chris BlackPPAY15.0000@15.0000@
54ZIMAN1Anthony ZimbardiPPAYBLACH1Chris BlackPPAY15.0000@15.0000@
55SMIJO2Jon SmithPPAYASSUOFO-01AssuredPartners of Ohio, LLC - RichfieldBPAY20.0000@20.0000@
56SMIJO2Jon SmithPPAYASSUOFO-01AssuredPartners of Ohio, LLC - RichfieldBPAY15.0000@15.0000@
57SMIJO2Jon SmithPPAYASSUOFO-01AssuredPartners of Ohio, LLC - RichfieldBPAY15.0000@15.0000@
58SMIJO2Jon SmithPPAYASSUOFO-01AssuredPartners of Ohio, LLC - RichfieldBPAY15.0000@15.0000@
59SMIJO2Jon SmithPPAYASSUOFO-01AssuredPartners of Ohio, LLC - RichfieldBPAY15.0000@15.0000@
60KEVILIN-01Kevin LindsleyBPAYKANCH1Chris KanePPAYRICBE1House- Richfield BenefitsPPAY50.0000@30.0000@30.0000@
61KANCH1Chris KanePPAYKEVILIN-01Kevin LindsleyBPAYRICBE1House- Richfield BenefitsPPAY30.0000@50.0000@30.0000@
62KANCH1Chris KanePPAYKEVILIN-01Kevin LindsleyBPAYRICBE1House- Richfield BenefitsPPAY30.0000@50.0000@30.0000@
63KANCH1Chris KanePPAYRICBE1House- Richfield BenefitsPPAY30.0000@30.0000@
64MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
65MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
66MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
67MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
68MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
69MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
70MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
71MITJE1J.E. MitchellPPAYRICBE1House- Richfield BenefitsPPAYJEDAG1Aggie JedlickaPPAY25.0000@25.0000@5.0000@
72KANCH1Chris KanePPAYKEVILIN-01Kevin LindsleyBPAYHOUEB1House Employee BenefitsPPAY30.0000@50.0000@30.0000@
Source
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Kindly give the answer as to how do you want the data to appear from above mentioned sheet.
 
Upvote 0
Kindly give the answer as to how do you want the data to appear from above mentioned sheet.
First, Thanks for your help.

Second, I was able to download and launch the XL2BB plugin earlier. However, since we are not allowed to add anything to our corporate laptops, the plugin has been delted from my computer since then. Therefore, I have to work with snapshots.

Second, here is a screen shot of the desired results from the above data set. I will be happy to email the Excel file if need be.

Hope this is helpful.

1637041337307.png
 
Upvote 0
Column 2 code-2 has more then one code . still didn't get it Why more product code are present in column 2 if there is single product code appearing in code 1 in desired result.
 
Upvote 0
I will be happy to email the Excel file if need be.
You can upload a sample file to DropBox or OneDrive, Google Drive etc and provide a publicly shared link here in the forum but emailing the file to a member would be a breach of #4 of the Forum Rules
 
Upvote 0
Column 2 code-2 has more then one code . still didn't get it Why more product code are present in column 2 if there is single product code appearing in code 1 in desired result.

These codes are producer codes (or sales person). The source system had option for up to four producers assigned to an account including the house account. The source system did not care where the house account was, i.e., Code-1 or Code-2 or Code-3, etc. The new system also has the option for four codes. However, Code-1 is limited to the house account. Hence I have to find the house account form the source system data and place it in the first spot. The remaining three spots will then be adjusted accordingly.

Row 36 in the above example shows the following:
House Account (HOUEB1) is in the code-3 spot
FEDEGRO-01 is in the Code-1 Spot
APBENEF-01 is in the Code-2 Spot.

When I transfer this data for the new system I will have to place them as follows:
Code-1 HOUEB1 (House account code)
Code-2 FEDGRO-01
Code-3 APBNEF-01

Hence, for a list of 55K+ records, I will have multiple codes in the second spots or third spot. However, first spot will always be the two House Account codes. (HOUEB1 or HOUPE1)

Hope this is helpful.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top