Results 1 to 7 of 7

FormulaArray autofill doesn't show correct value

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    FormulaArray autofill doesn't show correct value

    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
    Last edited by scott.s.fower; 12-05-2012 at 03:38 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1