Excel formula to separate data at each comma

galmond1010

New Member
Joined
Apr 15, 2019
Messages
21
My column data extract from Oracle looks like this : Food:.1,Retail:.8, Pkg:.1 . For the example, these are vertical markets and their percentage. Is there a formula I could use to separate the data at each comma? I am assuming in this example I would use 3 columns to display the separated data. Any help would be greatly appreciated. Thank you
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You could use text to columns on the data tab. Using the comma as the separator.
 
Upvote 0
I have tried that but it only sorts the data into 2 columns. Unless I am not using the text to columns correctly. The example above would show in column A Food:.1 and in column B Retail:.8, Pkg:.1. That's why I was wondering if it would be easier to use a formula instead. I will keep trying. Thank you.
 
Upvote 0
Book1.xlsx
ABC
1Food:.1,Retail:.8, Pkg:.1
2
3Food:.1Retail:.8Pkg:.1
Sheet4
Cell Formulas
RangeFormula
A3:C3A3=TRIM(MID(SUBSTITUTE($A$1,",",REPT(" ",999)),(COLUMN(A1)-1)*999+1,999))
 
Upvote 0
An alternative solution is to use Power Query. Mcode follows

Rich (BB code):
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Split Column by Delimiter" = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), {"Column1.1", "Column1.2", "Column1.3"})
in
    #"Split Column by Delimiter"
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,817
Members
449,049
Latest member
cybersurfer5000

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