VBA- how to dynamically extract a list of values from a column range given a condition

salman94

New Member
Joined
Jun 7, 2018
Messages
21
ABCDEF
FUND CODEFUND CODEDEALER CODEDEALER CODEDEALER CODE
AAAABA123345678
BBBBAB987654321
CCCC123111222333

<tbody>
</tbody>

Above table is in "Fundata List" Tab:
Hi, I would like to write a macro that will extract all the dealer codes from a tab called "Positions" for fund codes in each row of a list in "Fundata List" tab. Then output the dealer codes in the "Fundata List" in columns D, E, F... and so on (without duplicates).

The "Positions" tab has all the various fund codes in column C and their respective dealer codes in column P. Once it extracts and outputs all the different Dealer Codes in columns D, E, F, G, etc, then I would like to remove duplicates so a dealer code doesn't appear twice for each respective fund codes row. I will greatly appreciate anyone that can figure this out. Thanks in advance!

<tbody>
</tbody>
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,214,419
Messages
6,119,389
Members
448,891
Latest member
tpierce

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