Hi
I am trying to add a sumif formula to an existing macro. I am wanting to sum all minus values and all positive values. The start and end of the range being summed will change each time report is downloaded.
I have got to the top of my column of data as part of existing macro.
Actual SUMIF formula is =SUMIF(B23:B40,"<0",B23:B40). Range B23:B40 will vary each time report is run.
Any help to correct my formula would very much be appreciated.
Thank you
Coop123
I am trying to add a sumif formula to an existing macro. I am wanting to sum all minus values and all positive values. The start and end of the range being summed will change each time report is downloaded.
I have got to the top of my column of data as part of existing macro.
Dim Rng As Range
Set Rng = ActiveCell.End(xlDown)
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.Resize(4, 1).Select
Selection.Delete Shift:=xlUp
ActiveCell.Resize(1, 1).Select
ActiveCell.Offset(1, 1).Select
ActiveCell.FormulaR1C1 = "=SUMIF(Rng:R[-2]C2,"">0"",Rng:R[-2]C)"
Actual SUMIF formula is =SUMIF(B23:B40,"<0",B23:B40). Range B23:B40 will vary each time report is run.
Any help to correct my formula would very much be appreciated.
Thank you
Coop123