我有一个这样的单元格:
930 "<h2>Crawford, 1963-</h2> [wpse_playlist type=""audio"" tracklist=""true"" tracknumbers=""true"" images=""true"" artist=""true""] [wpse_trac title=""Indian Summer"" src=""http://urlnamehere/bitstream/handle/2374.UC/731507 /Elliston_Marisa_Crawford_01-10-14_Track_01.mp3?sequence=7"" type=""audio/mpeg"" caption="""" description="""" meta_artist=""Crawford, Marisa & Pendarvis, Jack, 1963-"" meta_length_formatted="""" thumb_src="""" image_width=""300""][wpse_trac title=""The River"" src=""http://urlnamehere/bitstream/handle/2374.UC/731507/Elliston_Marisa_Crawford_01-10-14_Track_02.mp3?sequence=8"" type=""audio/mpeg"" caption="""" description="""" meta_artist=""Crawford, Marisa & Pendarvis, Jack, 1963-"" meta_length_formatted="""" thumb_src="""" image_width=""300""][wpse_trac title=""Swimming in Lanes Five and Six
我想分解它,以便每个标题值和src值得到一行,同时保持相同的id(在这种情况下为930。因此:
第1行:
930 | wpse_trac title=""Indian Summer" | src=""http://urlnamehere/bitstream/handle/2374.UC/731507 /Elliston_Marisa_Crawford_01-10-14_Track_01.mp3?sequence=7"
第2行
930 | [wpse_trac title=""The River"" src=""http://urlnamehere/bitstream/handle/2374.UC/731507/Elliston_Marisa_Crawford_01-10-14_Track_02.mp3?sequence=8
答案 0 :(得分:1)
A1
。Data
标签,然后选择Text to Columns
Delimited
,然后按Next
。Other:
并输入]
,然后按Next
。Destination
中,选择A1
以外的单元格,然后点击Finish
。您会看到原始文本分为多个列。此时,请按照以下步骤操作:
Ctrl+H
以打开替换文字对话框。
在Find what:
中,输入" type*
并点击Replace All
。Transpose
,将其粘贴到行而不是列中。通过您做的一些微小的触摸完成所需的任务。 ENJOY
答案 1 :(得分:0)
如果您的文字位于单元格A1中并按下公式,请尝试以下公式:
=MID($A$1,1,SEARCH(" ",$A$1)-1)&" | "&MID($A$1,SEARCH("£wpse_trac title",SUBSTITUTE($A$1,"wpse_trac title","£wpse_trac title",ROW(A1))),SEARCH("£http:",SUBSTITUTE($A$1,"http:","£http:",ROW(A1)))-SEARCH("£wpse_trac title",SUBSTITUTE($A$1,"wpse_trac title","£wpse_trac title",ROW(A1)))-8)&" | "&MID($A$1,SEARCH("£http:",SUBSTITUTE($A$1,"http:","£http:",ROW(A1)))-6,SEARCH(" ",$A$1,SEARCH("£sequence",SUBSTITUTE($A$1,"sequence","£sequence",ROW(A1))))+10-SEARCH("£http:",SUBSTITUTE($A$1,"http:","£http:",ROW(A1)))-6)