Jovannivk
04-21-2022, 04:14 PM
Hi all,
I'm working on something here, but I cannot figure out how to do this most efficiently (and effectively).
I have an input cell where I should insert my user codes. These codes are supposed to be changed into columns. However, within this cell I have two types of user codes. Ones where I want them to be combined and ones that i want separately. I thought perhaps the distinction of + and , could make the difference to recognize which ones should be combined and which not.
Input:
aaa001+aaa0001,bbb001+bbb0001,ccc001,ccc002
Conditions:
- For combined codes (Identified by +):
[code1,code2]
- For single codes (identified by ,):
code 3
Desired output:
[aaa001,aaa0001]
-
[bbb001,bbb0001]
-
ccc001
-
ccc002
I must install two conditions. The codes that has the + inbetween should be combined, and the input should look the following: [aaa001,aaa0001]. The codes with , in between can be taken seperately with just the code. Example: ccc002.
How can I create a macro that will recognize which ones to split and which ones to combine, and for the ones that should be combined to be in this format.
I am open to any ideas, thank you in advance. And yes the output must be in this format. Excel sheet is attached.
29665
I'm working on something here, but I cannot figure out how to do this most efficiently (and effectively).
I have an input cell where I should insert my user codes. These codes are supposed to be changed into columns. However, within this cell I have two types of user codes. Ones where I want them to be combined and ones that i want separately. I thought perhaps the distinction of + and , could make the difference to recognize which ones should be combined and which not.
Input:
aaa001+aaa0001,bbb001+bbb0001,ccc001,ccc002
Conditions:
- For combined codes (Identified by +):
[code1,code2]
- For single codes (identified by ,):
code 3
Desired output:
[aaa001,aaa0001]
-
[bbb001,bbb0001]
-
ccc001
-
ccc002
I must install two conditions. The codes that has the + inbetween should be combined, and the input should look the following: [aaa001,aaa0001]. The codes with , in between can be taken seperately with just the code. Example: ccc002.
How can I create a macro that will recognize which ones to split and which ones to combine, and for the ones that should be combined to be in this format.
I am open to any ideas, thank you in advance. And yes the output must be in this format. Excel sheet is attached.
29665