+ Reply to Thread
Results 1 to 5 of 5

VLOOKUP variable col_index_num

  1. #1
    Registered User
    Join Date
    10-08-2004
    Posts
    49

    Post VLOOKUP variable col_index_num

    In vlookup is it possible to have the col_index_num change based on the contents of another cell?

    something like

    =VLOOKUP ( lookup value , table_array , col_index_num = B6, [range_lookup]
    so if B6 = 4 the col_index_num would be 4
    but if B6 = 7 the col_index_num would be 7

    Reason for asking is based on the number in column B is where I should take the answer from, offset by 4 or offset by 7.

    Thanks solti

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: VLOOKUP variable col_index_num

    Just try it!
    =VLOOKUP(lookup_value, table_array , B6, [range_lookup])
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  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 variable col_index_num

    Here is a nice video tutorial that will help you to understand how VLOOKUP function works

    http://www.youtube.com/watch?v=-hJxIMBbmZY
    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
    Registered User
    Join Date
    10-08-2004
    Posts
    49

    Thumbs up Re: VLOOKUP variable col_index_num

    Thanks Ron, I was close but was using ,=B6 not , B6

    AlKey will check out the video

    solti

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: VLOOKUP variable col_index_num

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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. [SOLVED] Performing a VLOOKUP function with a variable col_index_num
    By esseeayen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-08-2012, 06:48 PM
  2. ===How to Col_index_num in Vlookup===
    By advectorz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2008, 11:12 AM
  3. vlookup with variable col_index_num
    By 0-0 Wai Wai ^-^ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-16-2006, 01:25 PM
  4. Vlookup Col_index_num
    By Mort Australia in forum Excel General
    Replies: 5
    Last Post: 03-24-2006, 06:40 AM
  5. Variable col_index_num in vlookup
    By Hugh Murfitt in forum Excel General
    Replies: 1
    Last Post: 02-15-2006, 08:20 AM

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