K
K
Hi all, I got macro below which is not working as I get error syaing
"Type mismatch" and on clicking Debug button it highlights the below
line
c.Offset(0, 3).Value = Application.Evaluate("Sumproduct((" & RngC
= .Range("E1").Value & c.Offset(0, 1).Value & c.Offset(0, -1).Value &
")*(" & RngD & "))")
Please can any friend help me on this that what am I doing wrong
Sub PrepBlendDataRev()
Estlstcl = Sheets("Data").Cells(Rows.Count, "B").End(xlUp).Row
RngC = Sheets("Data").Range("A2:A" & Estlstcl)
RngD = Sheets("Data").Range("I2:I" & Estlstcl) '.Range("G2:G" &
Estlstcl) for Est without Adj
With Sheets("Record")
lastcl2 = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each c In .Range("B2:B" & lastcl2).Cells
c.Offset(0, 3).Value = Application.Evaluate("Sumproduct((" & RngC
= .Range("E1").Value & c.Offset(0, 1).Value & c.Offset(0, -1).Value &
")*(" & RngD & "))")
Next
End With
End Sub
"Type mismatch" and on clicking Debug button it highlights the below
line
c.Offset(0, 3).Value = Application.Evaluate("Sumproduct((" & RngC
= .Range("E1").Value & c.Offset(0, 1).Value & c.Offset(0, -1).Value &
")*(" & RngD & "))")
Please can any friend help me on this that what am I doing wrong
Sub PrepBlendDataRev()
Estlstcl = Sheets("Data").Cells(Rows.Count, "B").End(xlUp).Row
RngC = Sheets("Data").Range("A2:A" & Estlstcl)
RngD = Sheets("Data").Range("I2:I" & Estlstcl) '.Range("G2:G" &
Estlstcl) for Est without Adj
With Sheets("Record")
lastcl2 = .Cells(.Rows.Count, "A").End(xlUp).Row
For Each c In .Range("B2:B" & lastcl2).Cells
c.Offset(0, 3).Value = Application.Evaluate("Sumproduct((" & RngC
= .Range("E1").Value & c.Offset(0, 1).Value & c.Offset(0, -1).Value &
")*(" & RngD & "))")
Next
End With
End Sub