I'm having trouble figuring out how to set multiple criteria for a SumIf statement in VBA. This is what I'm using right now with only one criterion to set the value of a variable called Count_1.
Count_1 = Application.SumIf(Range("K84:K" & LastRow), "B*", Range("G84:G" & LastRow))
I need to add another criterion. In addition to the value in column K needing to begin with "B", the value in column L also needs to be 80.
I know this can be done using SumIfs in an Excel formula, but I need it to be in VBA.
Application.WorkSheetFunction.Sumifs()
– Scott CranerCount_1 = Application.SumIfs(Range("K84:K" & LastRow), "B*", Range("L84:L" & LastRow), "80", Range("G84:G" & LastRow))
– Robby80
instead of"80"
– Scott Craner