Need help with concatenate and finding all possible combinations.

Tbauerx25

New Member
Joined
Feb 7, 2022
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello All,

I've been searching for a solution to this unique excel issue for the past few days without luck.

I have a spreadsheet that has data in Columns a, b, and C. This data is customer name, whether or not the code is optional or required, and the code
Screenshot_20220207-213223_Excel.jpg


The first step I took was using the following formula =TEXTJOIN(",",TRUE,FILTER($C$2:$C$8019,$A$2:$A$8019=$F2))

This formula helped contenate the codes listed in column C based on the customer name to create a unique code for that customer.

However, i only did this for required but there are also optional codes. The reason I didn't contenate these is because the optional codes can vary:

Screenshot_20220207-214136_Excel.jpg


For example it would be all required plus one of the optional, all required plus two of the optional, all required plus option 1 and 3, all required plus option 2 and 4, ect.

The constant is the required i.e those will always be included but where it varies is the optional requirements and I need to figure out a way to list out all possible options.

I am wondering if there is a macro, formula, or any other solution that could assist?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,806
Messages
6,121,672
Members
449,045
Latest member
Marcus05

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