D
DogLover
I have this code and am having trouble with the Sumproduct working. I get a
Run-Time Error 13 and Type Mismatch message? Can anyone help.
Dim mTimeCriteria As String
Dim mQuestion1Range As Range, mTimeRange As Range
mTimeCriteria = "First day of employment (Time 1)"
Set mTimeRange = Worksheets("Data").Range("DataTime")
Set mQuestion1Range = Worksheets("Data").Range("DataQuestion1")
mTimeCriteria = """" & mTimeCriteria & """"
MsgBox Evaluate("=SUMPRODUCT( --(" & mTimeRange.Address & "= """ & _
mTimeCriteria & """), " & mQuestion1Range.Address & ")")
Run-Time Error 13 and Type Mismatch message? Can anyone help.
Dim mTimeCriteria As String
Dim mQuestion1Range As Range, mTimeRange As Range
mTimeCriteria = "First day of employment (Time 1)"
Set mTimeRange = Worksheets("Data").Range("DataTime")
Set mQuestion1Range = Worksheets("Data").Range("DataQuestion1")
mTimeCriteria = """" & mTimeCriteria & """"
MsgBox Evaluate("=SUMPRODUCT( --(" & mTimeRange.Address & "= """ & _
mTimeCriteria & """), " & mQuestion1Range.Address & ")")