I am getting a runtime 1004 error (Application-defined or object-defined error) with the following code:
*Note - If I cut and paste the formula directly into F2 it works just fine.
Thank you ahead of time!!!
Windows("master.xls").Activate
Sheets("data").Select
Lastrow = Range("D" & Rows.Count).End(xlUp).Row
Sheets("data").Select
Range("F1").Select
ActiveCell.FormulaR1C1 = "Sheet1 Data"
Range("F2").Select
ActiveCell.FormulaR1C1 = "=SUMPRODUCT(--(LOOKUP(MID(E2,ROW(E$1:INDEX(E:E,LEN(E2))),1),$A$1:$A$26,$B$1:$B$26)),10^(8)-ROW(E$1:INDEX(E:E,LEN(E2))))"
Selection.AutoFill Destination:=Range("F2:F" & Lastrow), Type:=xlFillSeries
Columns("F:F").Select
Selection.NumberFormat = "0;[Red]0"
Bookmarks