我在excel中有一个列,其中我有所有的网站url值。我的问题是我想把url值转换为活动链接。该列中大约有200个条目,所有单元格中都有不同的url。是否有一种方法可以在不编写宏的情况下创建到所有单元格的活动超链接。


当前回答

如果不允许添加带有超链接的额外列, 另一种方法是使用外部编辑器将您的超链接包含到=hyperlink(" and "),以获得=hyperlink("originalCellContent")

如果你有notepad++,这是一个你可以用来半自动执行这个操作的配方:

Copy the column of addresses to Notepad++ Keeping ALT-SHIFT pressed, extended your cursor from the top left corner to the bottom left corner, and type =hyperlink(". This adds =hyperlink(" at the beginning of each entry. Open "Replace" menu (Ctrl-H), activate regular expressions (ALT-G), and replace $ (end of line) with "\). This adds a closed quote and a closed parenthesis (which needs to be escaped with \ when regular expressions are activated) at the end of each line. Paste back the data in Excel. In practice, just copy the data and select the first cell of the column where you want the data to end up.

其他回答

如果你复制文本内容到一个新的列,并使用:

=HYPERLINK("http://"&B10,B10) 

在你原来的专栏上。然后使用$的列,使它看起来像这样:

=HYPERLINK("http://"&$B10,$B10)

这是我在Windows 7上使用Excel 2010的唯一方法。你可以把这个公式抄下来。

对于使用Excel 2016登陆这里的任何人,您可以简单地突出显示该列,然后单击样式框中Home ribbon上的超链接选项卡。

编辑:不幸的是,这只更新单元格样式,而不是函数。

您可以插入公式=HYPERLINK(<your_cell>,<your_cell>)到相邻的单元格,并将其一直拖到底部。这将为您提供一个包含所有链接的列。现在,您可以通过单击标题,右键单击并选择Hide来选择原始列。

对于比较短的列表来说非常简单:

双击url所在的方框 输入

你有你的链接;)

我很惊讶Excel没有自动做这个,所以这是我的解决方案,我希望对其他人有用,

将整个列复制到剪贴板 在Chrome或Firefox上打开这个

data:text/html,<button onclick=“document.write(document.body.querySelector('textarea').value.split('\n').map(x => '<a href=</a>\'' + x + '\'>' + x + '').join(''))<br>”>Linkify</button><br><textarea></textarea>

将该栏粘贴到刚刚在浏览器上打开的页面上,然后按“链接”键 将结果从选项卡复制到Excel的列中

代替第二步,您可以使用下面的页面,首先,单击“运行代码片段”,然后将列粘贴在上面 <按钮onclick = " document . write (document.body.querySelector(文本区域).value.split(“\ n”)。地图(x = > < a href = \”+ x + '\'>' + x + < / >) . join(“< br >”))按钮“>其内< / > < br > < textarea > < / >文本区域