Vlookup formula for second or third occurence

bthumble

Board Regular
Joined
Dec 18, 2007
Messages
197
I have a financial statement that has the same account on different rows for different years. How can I pick up the second or third occurrence using a vlookup, index/match, etc? The layout of my data is below. As an example, I normally use =VLOOKUP(Q4,A:M,2,FALSE) with 2 representing the values for that specific period

Column A account number
Col B January Values
Col C February Values
Col D March Values
....
....
....
Col L November Values
Col M December values
Col N Year

Thanks for your assistance.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Mike Szczesny

Active Member
Joined
Feb 7, 2008
Messages
411
Assume your data range is A1:D4. Assume Acct#,Jan,Feb,Mar is in A1:D1. Assume a, b, c, d are acct# numbers in A2:A4. A2:D4 contain values for each month. Use the specif range than columns

A6: b
A7: =vlookup($A$6,$A$2:$D$4,2,false) 2 refers to Jan, 3 refers to Feb, etc. If you want just Feb values, use 3 in formula.

If you need to show more than month, you can use a modification of this formula. If you want to show three months, (Jan, Feb, March) at the same time, select A7:C7 for formula. Use =vlookup($A$6,$A$2:$D$4,{2,3,4},false). Use Cntrl-Shift-Enter. 2,3,4 refer to Jan,Feb,March in vlookup table.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,627
Messages
5,838,443
Members
430,548
Latest member
hh_dh2001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top