I do not believe that this will be possible without a macro.
The hyperlink in an Excel cell has nothing to do with the value of the cell. This is a separate object associated with a cell. A fully functional way to add a hyperlink to a cell is through the menu item Excel Insert β Hyperlink.
The fact that the hyperlink is added when the user enters a value, such as "http: // ...", "https: // ..." or "ftp: // ...", is just a GUI that has one same effect as Insert β Hyperlink. In your example, when the user βtouchesβ the cell, they effectively enter the value βhttp: // ...β into the cell and the GUI shortcut for Insert β Hyperlink is called. However, the shortcut is NOT called when values ββare entered into the cells programmatically, either through VBA or the built-in Excel functions (for example, data β Import external data).
For this reason, it is really difficult to make this arbitrary data import the corresponding values ββin the form of hyperlinks without any macro. If you can convince your users to install a simple Excel add-in, you can provide a menu item that executes the following simple code: -
Dim cell as Range : For Each cell in Selection.Cells // could also use Range("A1").CurrentRegion.Cells or similar If Left(cell.Value, 7) = "http://" Or Left(cell.Value, 8) = "https://" Or Left(cell.Value, 6) = "ftp://" Then Call cell.HyperLinks.Add(cell, cell.Value) End If Next cell
The user can call this after importing / updating data. Obviously, this is far from ideal, because it relies on the user taking an extra step to render hyperlinks.
source share