2017-05-08 33 views
0

我有一个单元是这样的:转换值转换成许多行,相同的ID值

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

你打破一条线的标准是什么? 930开始?以'sequence ='和一个数字结束? – Absinthe

回答

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) 

string substitute

+0

谢谢,我会尝试! – LisaH

1
  1. 放置文本A1
  2. 转到Data选项卡,选择Text to Columns
  3. 选择Delimited并按Next
  4. 检查Other:并输入]并按Next
  5. Destination中,选择除A1以外的其他单元,然后单击Finish

你会看到你的原始文本分成许多列。此时按照以下步骤操作:

  1. 按键盘上的Ctrl+H打开替换文本对话框。 在Find what:中,输入" type*并点击Replace All
  2. 选择所有包含结果数据的单元格,复制它们并将其粘贴为Transpose以将它们粘贴到行而不是列中。
  3. 取出第一个和最后细胞(这是不希望)

与你做一些微小的接触完成所需的任务。 ENJOY