Как я могу сделать столбец Excel гиперссылок открытым в браузере по умолчанию

350
Alex

У меня есть лист MS Excel 2007 со столбцом (A) гиперссылок, использующий функцию Excel таким образом =HYPERLINK(A2,"url".

Как я могу сделать (если это возможно) открыть все ячейки в этом столбце в браузере по умолчанию?

1
Короткий ответ: нет, вы не можете Raystafarian 7 лет назад 0

1 ответ на вопрос

1
Divin3

If you enter the path of the browser with the exe file and put the URL after, it will open using that browser.

For example

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" http://superuser.com/questions/1079979/how-can-i-make-an-excel-column-of-hyperlinks-open-in-non-default-browser 

Unfortunately you can not use this in Excels Hyperlink function, so we need a workaround.

One solution would be, to create a batch file and set the hyperlink to run that batch file. All you need to do is copy the code into a text file, and save it as .bat


Another solution is using VBA.
Press alt + F11, and paste the following code into "ThisWorkbook".

Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink) If Target.Name = "asd" Then 'Or you can identify a cell using it's range instead of its name If Target.Range.Address = "$A$1" Then Shell ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe http://superuser.com/questions/1079979/how-can-i-make-an-excel-column-of-hyperlinks-open-in-non-default-browser") End If End Sub 

Than you have to make a hyperlink out of the cell by right click, hyperlink, select place in this document, than ok.