mardi 24 février 2015

Varying ranges in sum and criteria range for IF statments

Hey guys I need help with my novice skills at VBA code writing. I would like to modify the code below to accommodate the varying ranges of data rows for my sum range and criteria range in a SUMIF statment.



ActiveCell.FormulaR1C1 = _
"=(SUMIF(R[-39]C:R[-3]C,""*DF*"",R[-39]C[1]:R[-3]C[1])+SUMIF(R[-39]C[2]:R[-3]C[2],""*DF*"",R[-39]C[3]:R[-3]C[3]))"


I hope I was specific enough if not let me know what other information you might need. Thank you!


Aucun commentaire:

Enregistrer un commentaire