Here’s an example of an OfficeScript that loops through the items or cells in a selected range: function main(worksheet: ExcelScript.Worksheet, rangeAddress: string) { // Get the selected range let selectedRange = worksheet.getRange(rangeAddress); // Get the values in the range let rangeValues = selectedRange.getValues(); // Loop…