Hi,
I would like to be able to use VBA to enter a formula in a group of cells where the formula contains a range but the range itself might change.
So currently I have,
Range(Range("St_ActDetail").Offset(1, 10), Range("St_ActDetail").Offset(100, 10)).Formula = "=IF(COUNT(R6:V6)=0,1,OFFSET(Q6,0,COUNT(R6:V6)))"

However, R6:V6 might change to S6:T6 for example and so I want to make the formula flexible. Any suggestions on how I could do this?
Many thanks,
Fen