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

1. ## 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))  Register To Reply

2. ## 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.  Register To Reply