When I run the following script, I get an error - to fix it, I need to double click on the cell and enter. Any idea why this is happening?
var cell = sheet.getRange("E44");
cell.setFormula('=IF(AND(E3="Cash",E4="Residential",E5="Single"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,2,FALSE),' +
'IF(AND(E3="Cash",E4="Residential",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,2,FALSE),' +
'IF(AND(E3="Cash",E4="Residential",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,3,FALSE),' +
'IF(AND(E3="Cash",E4="Commercial",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,4,FALSE),' +
'IF(AND(E3="Finance",E4="Residential",E5="Single"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,5,FALSE),' +
'IF(AND(E3="Finance",E4="Residential",E5="Three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,6,FALSE),' +
'IF(AND(E3="Finance",E4="Commercial",E5="Three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,7,FALSE),0)');
var cell = sheet.getRange("E44");
cell.setFormula('=IF(AND(E3="Cash",E4="Residential",E5="Single"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,2,FALSE),' +
'IF(AND(E3="Cash",E4="Residential",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,2,FALSE),' +
'IF(AND(E3="Cash",E4="Residential",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,3,FALSE),' +
'IF(AND(E3="Cash",E4="Commercial",E5="three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,4,FALSE),' +
'IF(AND(E3="Finance",E4="Residential",E5="Single"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,5,FALSE),' +
'IF(AND(E3="Finance",E4="Residential",E5="Three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,6,FALSE),' +
'IF(AND(E3="Finance",E4="Commercial",E5="Three"),VLOOKUP(C10,\'RRP Pricing\'!A2:G58,7,FALSE),0)');