N
N
Nick202020-05-15 22:21:44
excel
Nick20, 2020-05-15 22:21:44

Automatically create a link when you enter a keyword in a cell?

Hello.

Please tell me how to automatically assign a link to a cell in Excel.
There is a site (for example): https://example.com/cases/case-xxxx

It is necessary that when entering into a cell, for example:

case- 1

the cell was automatically assigned a link. https://example.com/cases/case-1

The number will therefore always be different, it can be from one to five characters in length.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
G
Grigory Boev, 2020-05-16
@Nick20

If in a simple way - select a separate column for inscriptions and links. In the link column, do this:
=ГИПЕРССЫЛКА("https://example.com/cases/"&A1)
, where A1 is a link to "case-xxxx"
If the column is a pity, or so inconvenient - make a macro with something like this algorithm:
1) Track the fact that the cell has changed. For VBA/Excel it will be Worksheet_Change(ByVal e As Range) , for Google Spreadsheets - onEdit(e)
2) Check inside the function which column is changing, continue if necessary, otherwise exit
3) Take the value and replace it with the formula I wrote higher

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question