Vlookup formula for second or third occurence

bthumble

Board Regular
Joined
Dec 18, 2007
Messages
231
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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.
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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
Back
Top