Extract URL Code for Google Sheets | Column A to B
function extractUrls() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(‘Sheet1’); //change to your sheet name var data = sheet.getRange(‘A1:A192’).getRichTextValues(); // change range accordingly var urls = []; for (var i = 0; i < data.length; i++) { var url = data[i][0].getLinkUrl(); urls.push([url]); } sheet.getRange(‘B1:B192’).setValues(urls); // change range accordingly }
Extract URL Code for Google Sheets | Column A to B Read More »