How can I split the text by semicolon in Column A and and make key/value in Excel?

asifakhtar

New Member
Joined
Oct 13, 2009
Messages
13
Office Version
  1. 365
I have an Excel sheet with 500 values in column A. I am looking for a formula to split the text in column A by semicolon and then append index(starting from 0) and then equal to sign and then the text. e.g 1=aaa.....

Example Text in Column A:
;aaa.;bbb.;ccc.

Desired Output:
0=;1=aaa.;2=bbb.;3=ccc.


I have tried the following code but it starts from 1 instead of 0.
=LET(cel,A1,arr,TRIM(MID(SUBSTITUTE(cel,";",REPT(" ",999)),(ROW($ZZ$1:INDEX($ZZ:$ZZ,LEN(cel)-LEN(SUBSTITUTE(cel,";",""))+1))-1)*999+1,999)),TEXTJOIN(";",,SEQUENCE(COUNTA(arr))&"="&arr))
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

How about
Excel Formula:
=LET(cel,";"&A2&";",s,SEQUENCE(,LEN(cel)-LEN(SUBSTITUTE(cel,";",""))-1),arr,REPLACE(LEFT(cel,FIND("^",SUBSTITUTE(cel,";","^",s+1))-1),1,FIND("^",SUBSTITUTE(cel,";","^",s)),""),TEXTJOIN(";",,s-1&"="&arr))
 
Upvote 0

Forum statistics

Threads
1,223,933
Messages
6,175,479
Members
452,647
Latest member
MatthewBiersay

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