Hi all, having a little problem with this sumproduct formula in VBA, it compiles fine but throws out a Type mismatch error at runtime.
rngdata is my raw data
rngsum1 is a summary table I am populating
Introw is an integer value
Intcolumn is an integer value
Any help greatly appreciated
rngdata is my raw data
rngsum1 is a summary table I am populating
Introw is an integer value
Intcolumn is an integer value
Code:
RngSum1.Cells(IntRow, IntColumn) = Application.WorksheetFunction. _
SumProduct((Range(RngData.Cells(2, 1), _
RngData.Cells(RngData.Rows.Count, 1)) = "General Practitioners") * _
(Left(Range(RngData.Cells(2, 2), RngData.Cells(RngData.Rows.Count, 2)), _
Len(RngSum1.Cells(IntRow, 1)) - 3) = Mid(RngSum1.Cells(IntRow, 1), 4, 100)) * _
(Range(RngData.Cells(2, IntColumn), RngData.Cells(RngData.Rows.Count, _
IntColumn))))
Any help greatly appreciated