Is there any way to programmatically concatenate text (e.g. using formulas) that includes hyperlinked text?
I am looking for a way to automate creation of documents that have links within long text descriptions in cells, e.g. invoices.
In Google Sheets, the
HYPERLINK
function in Google Sheets returns hyperlink enabled text and the
CONCATENATE
function allows stringing together or appending various texts.
Formula | Result |
---|---|
=HYPERLINK("https://stackoverflow.com", "Stack Overflow") |
then this is possible to achieve only manually editing the cell (or with script). usage of any internal formula you think of will render it as "plain text" (eg. removing the hyperlink) CodePudding user response: Unfortunately, not in that way. Hyperlink (via formula) will always include the whole text in the cell, but I recommend you, if possible, to arrange the whole text in the invoice to leave the hyperlink in a cell, with all the paragraphs around. it's an idea of how I would try it. CodePudding user response: You can set multiple hyperlinks (as many as you wish) with this script (not by formula)
By the way, if you want to retrieve all the links, use
By a combination of these two scripts, you can create a custom function to concatenate multiple cells with or without links and keep the right link to the right portion of text.
|