Missing Instruction/Error in Automation Script
Hi all,
I’m sure this is going to be some basic thing, but I am getting an error when my automation script runs, specifically this portion below. What is missing or not formatted correctly? It is intended to apply a conditional rule across column A that uses function RIGHT to find any number ending in 2 or 7 and apply custom formatting.
Please let me know what other info is needed if any, thank you in advance!
// Create custom from range A:A on selectedSheet
conditionalFormatting = selectedSheet.getRange(“A:A”).addConditionalFormat(ExcelScript.ConditionalFormatType.custom);
conditionalFormatting.getCustom().getRule().setFormula(“=OR(RIGHT(A1,1)=””2″”,RIGHT(A1,1)=””7″”)”);
conditionalFormatting.getCustom().getFormat().getFill().setColor(“#92d050”);
conditionalFormatting.getCustom().getFormat().getFont().setBold(true);
conditionalFormatting.getCustom().getFormat().getFont().setItalic(false);
conditionalFormatting.setStopIfTrue(false);
conditionalFormatting.setPriority(0);
}
Hi all, I’m sure this is going to be some basic thing, but I am getting an error when my automation script runs, specifically this portion below. What is missing or not formatted correctly? It is intended to apply a conditional rule across column A that uses function RIGHT to find any number ending in 2 or 7 and apply custom formatting. Please let me know what other info is needed if any, thank you in advance! // Create custom from range A:A on selectedSheet
conditionalFormatting = selectedSheet.getRange(“A:A”).addConditionalFormat(ExcelScript.ConditionalFormatType.custom);
conditionalFormatting.getCustom().getRule().setFormula(“=OR(RIGHT(A1,1)=””2″”,RIGHT(A1,1)=””7″”)”);
conditionalFormatting.getCustom().getFormat().getFill().setColor(“#92d050”);
conditionalFormatting.getCustom().getFormat().getFont().setBold(true);
conditionalFormatting.getCustom().getFormat().getFont().setItalic(false);
conditionalFormatting.setStopIfTrue(false);
conditionalFormatting.setPriority(0);
} Read More