Vlookup to return the nth value.

Drachels2413

New Member
Joined
Aug 21, 2019
Messages
1
This is my formula that returns the 1st value but I need to return the data from the 2nd and so on. My project is to pull data to populate invoices based on the invoice number.

=VLOOKUP(value(rngInvoice),Received_Process, 2,false)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I could do this with INDEX and AGGREGATE but if you want to use VLOOKUP then I'll need to add a worker column.

ABCDEFG
1What?=X513
2
3WorkerrngInvoiceValueInvoiceReceived
43X512X512 $ 13.20 X513 $ 33.00
53X412X412 $ 16.50 X513 $ 23.10
63X513X513 $ 19.80 X513 $ 19.80
72X513X513 $ 23.10
81X013X013 $ 26.40
91X613X613 $ 29.70
101X513X513 $ 33.00
110X313X313 $ 36.30

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
VLOOKUP (4)

Worksheet Formulas
CellFormula
F4=IF(ROWS($F$3:F4)>(COUNTIF($B$4:$B$25,$G$1)+1),"",VLOOKUP(ROWS($F$3:F4)-1&$G$1,$A$4:$C$20,2,0))
G4=IF(ROWS($F$3:F4)>(COUNTIF($B$4:$B$25,$G$1)+1),"",VLOOKUP(ROWS($F$3:F4)-1&$G$1,$A$4:$C$20,3,0))
A4
=IF(B4="","",COUNTIF($B4:$B$21,"*"&$G$1&"*")&B4)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I believe you can do this with 1 ARRAY formula (CTRL+Shift+Enter):

Code:
=INDEX(Received_Process,SMALL(IF(InvList=FindValue,ROW(InvList)-ROW(INDEX(InvList,1,1))+1),2))

where the 2 is the second occurrence to be found in the InvList and return that value from the InvList. Change the 2 accordingly.
 
Upvote 0
Sorry, this: where the 2 is the second occurrence to be found in the InvList and return that value from the InvList. Change the 2 accordingly.

should have been where the 2 is the second occurrence to be found in the InvList and return that value from the Received_Process. Change the 2 accordingly.
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,696
Members
449,048
Latest member
81jamesacct

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