Godders199
Active Member
- Joined
- Mar 2, 2017
- Messages
- 313
- Office Version
- 2013
I have the following vba which works, but i need to change the sum
For i = 1 To Cells(Rows.Count, "b").End(xlUp).Row
Range("ae" & i) = WorksheetFunction.Sum(Range("ad" & i & ":af" & i))
Next i
it needs to say
Range("ae" & i) = WorksheetFunction.Sum(Range("ad" & i & ":af" & i ":-y" & i))
when i add the subraction it errors..
I also need to add in the value in cell o8 on sheet 4 so effectlively the whole formula would be
(ad & i + Af & i - y & i)+cell o8 on sheet 4
if anyone can help ..
much appreciated.
For i = 1 To Cells(Rows.Count, "b").End(xlUp).Row
Range("ae" & i) = WorksheetFunction.Sum(Range("ad" & i & ":af" & i))
Next i
it needs to say
Range("ae" & i) = WorksheetFunction.Sum(Range("ad" & i & ":af" & i ":-y" & i))
when i add the subraction it errors..
I also need to add in the value in cell o8 on sheet 4 so effectlively the whole formula would be
(ad & i + Af & i - y & i)+cell o8 on sheet 4
if anyone can help ..
much appreciated.