I'm sure the answer must be SIMPLE - like me! I have a variable i which equals the particular row number. My macro puts a formula in a cell provided the sum of cells AK(i) to AU(i) isn't 0. I've tried the following combinations,
I apologise if I've overlooked an obvious syntax error. It really doesn't seem to like the ':' "Compile error: Expected: list separator or )"
Many thanks, Des.
Code:
If Not (sum(cells("AK" & i):("AU" & i))) = 0 Then 'Only do when Cumulative figures present
If Not (sum(Range("AK" & i):("AU" & i))) = 0 Then
If Sum (cells(RiC31:RiC42)) <> 0 Then
I apologise if I've overlooked an obvious syntax error. It really doesn't seem to like the ':' "Compile error: Expected: list separator or )"
Many thanks, Des.