The VBA code correctly inputs the formula into the desired cell but when it autofills to desired destination the value showing is the same as in cell G7. If I manually go to the cells and F2 then Ctrl+Shift+Enter the correct value shows up
...
Dim PMPT As String
Dim PA As String
Dim PID As String
PMPT = ActiveWorkbook.Name
PA = Sheets(2).Name
Sheets(PA).Select
Range(Range("B3"), Range("B3").End(xlDown)).Name = "PIDTrim"
Range(Range("C3"), Range("C3").End(xlDown)).Name = "Whse"
Range(Range("E3"), Range("E3").End(xlDown)).Name = "BOMNS"
...
LastFRow = CStr(Range("F" & CStr(Application.Rows.Count)).End(xlUp).Row)
Range("G7").Select
ActiveCell.FormulaArray = "=INDEX('" & PMPT & "'!BOMNS,MATCH(RC[-2]&RC[12],'" & PMPT & "'!PIDTrim & '" & PMPT & "'!Whse,0))"
Range("G7").Select
Selection.AutoFill Destination:=Range("G7", Range("G" & LastFRow)), Type:=xlFormula
Bookmarks