+ Reply to Thread
Results 1 to 2 of 2

How can I set my vlookup to pull the next number in the list?

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    72

    How can I set my vlookup to pull the next number in the list?

    I want to setup a vlookup that will pull over 1 of each number in a given data set. See below for example.

    Example:
    A|B
    1|3
    1|7
    2|8
    3|1
    3|2
    3|2
    3|9

    =vlookup(3,$A$1:$B$6,2,false)
    This will result with the value of 1, which is needed for the first input, but after that, I want the next formula in the cell underneath it to display 2 and then the formula in the cell beneath that to display 9 (instead of 2 again). Is there anyway I can set this up in excel? Any help on this is much appreciated!

    EDIT: I was able to solve this with: =INDEX($A$2:$A$8,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$8),0,0),0))
    Last edited by ipausa; 08-30-2013 at 06:25 PM.

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

    Re: How can I set my vlookup to pull the next number in the list?

    Thanks for posting the solution. In future, you can post the solution in post 2 so its clear to others which is the question and which is the solution.
    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. Using Vlookup to pull hyperlink from Master Hyperlink file list.
    By theflyingnimbus in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2013, 01:42 PM
  2. [SOLVED] Using VLookup to pull data out of a list
    By Seagood3 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-21-2012, 02:08 PM
  3. Pull from list based on number of orders
    By cshort in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-20-2011, 11:22 AM
  4. Pull codes from list based on number of orders
    By cshort in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 11:01 AM
  5. Vlookup of list with text and number
    By robertjtucker in forum Excel General
    Replies: 2
    Last Post: 02-08-2006, 01:25 PM

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