+ Reply to Thread
Results 1 to 5 of 5

vlookup - col_index_num "auto fill" when drag filling formula?

  1. #1
    Registered User
    Join Date
    10-17-2013
    Location
    East Coast
    MS-Off Ver
    Excel 2003
    Posts
    1

    vlookup - col_index_num "auto fill" when drag filling formula?

    Hi all.

    Here's the skinny.

    I have a list of emails in column A. My table array is a list of contacts with the email also in column A.

    My formula in cell B2 is:
    =VLOOKUP($A2,'Sheet A'!$A:$O,2,FALSE)
    Is there any way to have the column index number update such that when I drag-fill the formula into cell C2 it becomes "3" and so on? I have about 35 columns to fill in and don't want to have to manually update the col_index_num in each formula.

    Thanks.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: vlookup - col_index_num "auto fill" when drag filling formula?

    =VLOOKUP($A2,'Sheet A'!$A:$O,columns($a$1:b1),FALSE) filled across
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: vlookup - col_index_num "auto fill" when drag filling formula?

    Try this

    =VLOOKUP($A2,'Sheet A'!$A:$O,COLUMN(B1),FALSE)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: vlookup - col_index_num "auto fill" when drag filling formula?

    Try not using vlookup to begin with..
    Use Index(Match instead...

    =INDEX('Sheet A'!B:B,MATCH($A2,'Sheet A'!$A:$A,0))

    The reference to B:B will incriment automatically as formula is dragged to the right.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: vlookup - col_index_num "auto fill" when drag filling formula?

    Also, considering that you are pulling multiple column values based on the same match..
    To significantly improve performance, put the match in it's own cell, and refer to that cell with INDEX

    Say Z2 for example
    Z2: =MATCH($A2,'Sheet A'!$A:$A,0)
    Then use
    =INDEX('Sheet A'!B:B,$Z2)

    This way, the function of finding the match is only done once (in Z2) for the entire row of formulas.
    Where with vlookup and INDEX(MATCH, the match is done for every single formula in the row.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto Filling a Table with "Count" of merged cells
    By Kram222 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-13-2012, 05:41 AM
  2. Dynamic Table Auto Fill Help "Inconsistent Calculated Column Formula"
    By GMAGANA in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-02-2012, 12:03 PM
  3. [SOLVED] Auto filling the "Large" Function.
    By crasecm in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-28-2012, 09:27 PM
  4. Using auto-fill with a "formula"
    By cpgoose in forum Excel General
    Replies: 0
    Last Post: 03-22-2010, 04:50 PM
  5. Is there an "auto fill" formula?
    By punter in forum Excel General
    Replies: 1
    Last Post: 12-08-2005, 08:45 PM

Tags for this Thread

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