Hi,
I'm getting an error running this code, can anyone help me by pointing out why?
It's currently returning a #NAME ? error.
Can anyone help me make this work?
I'm getting an error running this code, can anyone help me by pointing out why?
Code:
Dim SumRange As Range
Dim CritRange1 As Range
Dim Criteria1 As String
Dim CritRange2 As Range
Dim Criteria2 As String
Set CriteriaRange1 = Range("C3:C" & LastRow)
Criteria1 = Sheets("Forecast Data").Cells(3, 2).Value
Set CriteriaRange2 = Range("D3:D" & LastRow)
Criteria2 = Sheets("Forecast Data").Cells(3, 3).Value
Set SumRange = Range("H3:H" & LastRow)
Sheets("Forecast Data").Cells(3, 5).Value = Evaluate("=SUMIFS(SumRange,CriteriaRange1,""" & Criteria1 & """,CriteriaRange2,""" & Criteria2 & """)")
It's currently returning a #NAME ? error.
Can anyone help me make this work?