Untitled

 avatar
unknown
plain_text
5 months ago
477 B
3
Indexable
function GetURL(input) {
  var myFormula = SpreadsheetApp.getActiveRange().getFormula();
  var myAddress = myFormula.replace(/=.*?\(/,'').replace(')','');
  var myRange = SpreadsheetApp.getActiveSheet().getRange(myAddress);
  
 var richTextValues = myRange.getRichTextValue().getRuns();
 var urls = [];

 for (var i = 0 ; i < richTextValues.length; i++) {
  var url = richTextValues[i].getLinkUrl();
  if (url) {
      urls.push(url);
  }
}

 return [urls];
 };
Editor is loading...
Leave a Comment