I am trying to put a SUMIF statementin VBA into a moving range of cells as the program cycles through. Therefor I need the criteria of the SUMIF formula to change as well. I want to put variables in for the range in the formula so as the variable lastRow increments, the range the formula searches also increments with that. Any suggestions?
ie
cells(lastRow,4).formula = "=sumif( b2:" & variable referencing another cell & "," & variable referencing text of a cell & ", c3:" & variable referencing another cell & ")"
Bookmarks