专注云计算教学
新手上云第一站

巧用宏工具提取Excel文字中带的超链接

标题和日期分列开来后就要开始批量提取超链接了,在进行批量处理之前,我们需要确保我们的Excel的宏是能正常使用的,office excel的宏在”工具→宏“。(wps个人版默认是不支持宏的,如果你使用的是wps,需要安装宏)这里主要讲一下office的操作方法,确保表格的宏启用后,按住ALT+F11进入宏菜单界面:

在宏界面的菜单→插入→模块→粘贴下代码:

 

Sub test()

For Each cell In Range(“B1:B21”)

cell.Offset(0, 1) = cell.Hyperlinks(1).Address

Next

End Sub

注意事项:代码中A1:A21为实际有超链接单元格区域,即标题的实际行数,所以操作的时候需要根据你实际有超链接单元格的区域进行调整

赞(5)
未经允许不得转载:WM云建站 » 巧用宏工具提取Excel文字中带的超链接

评论 6

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    感谢分享

    i禹州6年前 (2018-04-15)回复
    • 😛 😛 😛

      wshenm6年前 (2018-04-15)回复
  2. #2

    Thanks for finally talking about >巧用宏工具提取Excel文字中带的超链接 | 感谢分享 <Liked it!

  3. #3

    I believe what you wrote made a lot of sense. However, think on this, suppose you added a little content?

    I mean, I don’t want to tell you how to run your website, but what if you added
    a post title to possibly get folk’s attention? I mean 巧用宏工具提取Excel文字中带的超链接 | 感谢分享 is kinda plain. You might peek at
    Yahoo’s front page and watch how they create article headlines to
    grab people to open the links. You might add a video or a related pic or two to grab people interested about what you’ve written. In my opinion, it could make your posts a little bit more interesting.

  4. #4

    Thanks for sharing your thoughts on WshenM云建站.
    Regards

    g5年前 (2019-05-13)回复
  5. #5

    What you typed was very reasonable. But, consider
    this, suppose you were to create a awesome headline?
    I mean, I don’t want to tell you how to run your website, but what if you added a
    headline that grabbed people’s attention? I mean 巧用宏工具提取Excel文字中带的超链接
    | 感谢分享 is a little boring. You might look at Yahoo’s front page and note how they create news
    titles to get viewers interested. You might add a video
    or a related pic or two to get people excited about
    everything’ve got to say. In my opinion, it could bring your posts a little livelier.

    gamefly free trial5年前 (2019-06-03)回复