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

2018年3月6日16:26:41 6 2,647 views

标题和日期分列开来后就要开始批量提取超链接了,在进行批量处理之前,我们需要确保我们的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为实际有超链接单元格区域,即标题的实际行数,所以操作的时候需要根据你实际有超链接单元格的区域进行调整

aprioy

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

目前评论:6   其中:访客  5   博主  1

    • avatar i禹州 0

      感谢分享

        • avatar wshenm Admin

          @i禹州 :razz: :razz: :razz:

        • avatar download minecraft for free 0

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

          • avatar minecraft download for free 0

            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.

            • avatar g 0

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

              • avatar gamefly free trial 0

                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.