简体   繁体   中英

Excel string split on html tags

I am searching since a while for a solution to this and I am sure it exists. I came close but I am simply not able to get it working:

I have a excel file with a list of products and their 3 selling points in html.

A1 contains the string:

<li>Sellingpoint1</li><li>Sellingpoint2</li><li>Sellingpoint3</li>

I need to reuse the content in another way and would like to split the selling points and remove the html:

B1 should be: Sellingpoint1
C1 should be: Sellingpoint2
D1 should be: Sellingpoint3

I have tried with following solutions which I found on this forum: In B1 enter the formula

=IF(ISERROR(LEFT(A1,FIND(";",A1)-1)),A1,LEFT(A1,FIND(";",A1)-1))

In C1 enter the formula

=IF(ISERROR(RIGHT(A1,LEN(A1)-FIND(";",A1))),"",RIGHT(A1,LEN(A1)-FIND(";",A1)))

Could anyone please help me to get this working

Try,

=TRIM(MID(SUBSTITUTE(SUBSTITUTE($A2, "</", ""), "li>", REPT(" ", LEN($A2))), LEN($A2)*((COLUMN(A:A)-1)*2+1), LEN($A2)))

Fill right as necessary.

selling_point

请执行以下步骤:选择整个数据->转到数据选项卡->文本到列->选择定界->下一步->选中其他并在框中输入“ /”->完成

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