abberyfarm
Well-known Member
- Joined
- Aug 14, 2011
- Messages
- 733
Hi there,
I have a sum below and I need to create an if loop. How can I say, if the value calculated is less than zero and rc[-21] is greater than 2000, then return zero. Else return the sum (which will be positive).
Thank you
I have a sum below and I need to create an if loop. How can I say, if the value calculated is less than zero and rc[-21] is greater than 2000, then return zero. Else return the sum (which will be positive).
Thank you
Code:
Range("z2:z" & Lastrow3).FormulaR1C1 = "=rc[-1] + rc[-2] + rc[-3] + rc[-11]"