Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9831

Google sheets, how do I combine data from two cells, where there is a URL (web-link) in the cells, without loosing the link(url)

$
0
0

I have tried to write a custom function in google sheets.

I tried to create a function to joint the content of two cells. It works for text, however it does not work if the text contains a web-link (URL). The link is removed.

The code

function combine(...theArgs) {  var result ="";  var is_first = true;  theArgs.forEach( function (value, index){    if (! is_first) {      result += "\n\n";    }    is_first=false;    result += value;  });  return result;}

Usage =combine(ref, ref) e.g. =combine(a1,b1)

I tried to use =hyperlink(url,text), this can combine the text and link from different cells, so I then tried =hyperlink(url1, text1) & hyperlink(url2, text2). The & is demoting the link to text (removes the url).

Acceptable answers: - How to get a custom function to work. - Use of built in function. - Something else that has the same effect.


Viewing all articles
Browse latest Browse all 9831

Latest Images

Trending Articles



Latest Images