I have written a macro for my excel sheet. Part of the macro clears the sheet and puts the formulas back in the cells. I want the formula to be an IF statement so the cell will be blank if the checkbox is not clicked. The formula works when written in the excel formula bar but when I add it in the macro it gives a runtime error. Any help is appreciated.
'CLEAR EXTERIOR REMODEL SECTION
Range("K14:K18").ClearContents
Range("K14").Formula = "=IF(AE57=TRUE,Abs(0.01 * J14) * AE57,"")"
Range("K15").Formula = "=Abs(0.01 * J15) * AE58"
Range("K14") has the new formula I would like to use. K15 was the old one that did work fine.