Home > database >  Edit Multiple Links at Once In Google Sheets
Edit Multiple Links at Once In Google Sheets

Time:06-11

I'm working with some very large spreadsheets. There is clickable text that has an embedded link in many of the cells. However, I want to edit the cells so that they contain the actual links rather than the text.

I know how to do this manually (click below link to see image), one entry at a time, but need to figure out how to do all of them in one go.

google sheets - "edit link"

CodePudding user response:

Adding this function to the Apps Script ended up solving it for me.

function GetURL(input) {
  var myFormula = SpreadsheetApp.getActiveRange().getFormula();
  var myAddress = myFormula.replace('=GetURL(','').replace(')','');
  var myRange = SpreadsheetApp.getActiveSheet().getRange(myAddress);
  return myRange.getRichTextValue().getLinkUrl()
 }

Source: oksheets.com/extract-hyperlink-url/

  • Related