I am trying to enter the following formula into cells on a worksheet change event but it errors out.
formula to input is: "=IF(H$10="",($H$8/12*K$8),($H$8/12*K$8)+H$10)"
I have used the following format to do this:
when selecting "Post Tender Activity", the first line clears the range preceding the cells where the formula is to reside, and then it errors out on the line beginning Target.Offset(0,12) with the message "Application defined or Object defined error".
If i change out the formula bit to simply activate the cell, it works a treat.
formula to input is: "=IF(H$10="",($H$8/12*K$8),($H$8/12*K$8)+H$10)"
I have used the following format to do this:
Code:
Case "Post Tender Activity"
.Range("J4:M4,o4:r4").Formula = "=0"
Target.Offset(0, 12).Formula = "=IF(H$10="",($H$8/12*K$8),($H$8/12*K$8)+H$10)"
Target.Offset(0, 13).Formula = "=IF(I$10="",($H$8/12*L$8),($H$8/12*L$8)+I$10)"
when selecting "Post Tender Activity", the first line clears the range preceding the cells where the formula is to reside, and then it errors out on the line beginning Target.Offset(0,12) with the message "Application defined or Object defined error".
If i change out the formula bit to simply activate the cell, it works a treat.