简体   繁体   中英

how to split a comma delimited string in a cell to multiple cells?

I am creating a excel for report automation, so where I get data like

165,1999,"619.827380952381","1132.98","1340.97",504

so I am trying to split this into multiple columns using formula

在此处输入图片说明

please help

I know this option exist but searching a solution with formula

在此处输入图片说明

With microsoft 365:

=FILTERXML("<t><s>"&SUBSTITUTE(SUBSTITUTE(A1,"""",""),",","</s><s>")&"</s></t>","//s")

Or, into columns:

=TRANSPOSE(FILTERXML("<t><s>"&SUBSTITUTE(SUBSTITUTE(A1,"""",""),",","</s><s>")&"</s></t>","//s"))

With Older versions (dragged down):

=FILTERXML("<t><s>"&SUBSTITUTE(SUBSTITUTE(A$1,"""",""),",","</s><s>")&"</s></t>","//s["&ROW(A1)&"]")

Or, into columns (dragged right):

=FILTERXML("<t><s>"&SUBSTITUTE(SUBSTITUTE($A1,"""",""),",","</s><s>")&"</s></t>","//s["&COLUMN(A1)&"]")

For more information about how this works, click here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM