ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Lookup nth entry (https://www.excelbanter.com/excel-discussion-misc-queries/240851-lookup-nth-entry.html)

Faraz A. Qureshi

Lookup nth entry
 
Any formula or UDF to use VLOOKUP so as to return the nth (for example 6th
entry) feedback when there are more than one matching entries in the lookup
array?
--
Best Regards,

Faraz

Jacob Skaria

Lookup nth entry
 
Hi Faraz

Try the below array formula

Lookup value in C1
Lookup array A1:B1000
The last entry denotes the nth entry (in this example it is 2)

=INDEX($B1:$B1000,SMALL(IF($A$1:$A$1000<$C1,"",($ A$1:$A$1000=$C1)*ROW($A$1:$A$1000)),2))

If this post helps click Yes
---------------
Jacob Skaria


"Faraz A. Qureshi" wrote:

Any formula or UDF to use VLOOKUP so as to return the nth (for example 6th
entry) feedback when there are more than one matching entries in the lookup
array?
--
Best Regards,

Faraz


Lars-Åke Aspelin[_2_]

Lookup nth entry
 
On Wed, 26 Aug 2009 21:26:05 -0700, Faraz A. Qureshi
wrote:

Any formula or UDF to use VLOOKUP so as to return the nth (for example 6th
entry) feedback when there are more than one matching entries in the lookup
array?




Try the following formula

=INDEX(B1:B50,SMALL(IF(A1:A50=C1,ROW(A1:A50)),C2))

Note: This is an array formula that has to be confirmed with
CTRL+SHIFT+ENTER rather than just ENTER.

A1:A50 is the leftmost column of your table array.
B1:B50 is where you results are
C1 is where your lookup value is
C2 is where your n, e.g. 6, is

Change these parameters to adapt to your worksheet.

Hope this helps / Lars-Åke.


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com