I have a sheet with two columns: "Snippet", containing a paragraph, and "Keywords", containing some comma separated keywords.
I am doing a script so on each row, if any of the keywords appear in the snippet, its appearance becomes bold.
However, I only found ways to make the whole cell bold:
function bold() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[0];
var lastRow = sheet.getLastRow();
var keywords = sheet.getLastColumn();
var snippet = sheet.getLastColumn() - 1;
var keywordVal = sheet.getRange(lastRow, keywords);
rangesp = sheet.getRange(lastRow, snippet).setFontWeight("bold")
}
The setFontWeight
seems to take only a range as an input, so I am able to bold a full cell. Is it really possible to do what I intend, and bold only a portion of the cell, rather than the full cell?