VLOOKUP with multiple rows

Pumperkin

Board Regular
Joined
Jan 24, 2019
Messages
59
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Trying to write a formula but getting stuck.

I have a list of around 30 items that are "Not Despatched". This list changes and I want to pull the updated list (which may be in different row numbers as time goes by, and there may be greater or fewer lines).

I tried VLOOKUP however given that I am only V lookingup "Not Despatched", it only brings up the data that appears first. I can't make the formula unique, as I don't know what I'm looking up (other than it being Not Despatched) before it's looked up.

Is there a way to do this other than just copying and pasting the list across?

TIA!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
A formula would be better as I don't want to have to constantly refresh the filter (I am pulling the data to another workbook).
 
Upvote 0
If you want a separate list, you could use something like


Book1
ABCDEF
1Not Despatched
2CarNot DespatchedCar
3BikeTV
4SofaMobile Phone
5TVNot Despatched
6Computer
7Mobile PhoneNot Despatched
Sheet3
Cell Formulas
RangeFormula
F2=IFERROR(INDEX($A$2:$A$7,AGGREGATE(15,6,(ROW($A$2:$A$7)-ROW($A$2)+1)/($C$2:$C$7=$F$1), ROWS($F$2:$F2))),"")
 
Upvote 0
If you want a separate list, you could use something like

ABCDEF
Not Despatched
CarNot DespatchedCar
BikeTV
SofaMobile Phone
TVNot Despatched
Computer
Mobile PhoneNot Despatched

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]4[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]5[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]6[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"][/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Sheet3

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]F2[/TH]
[TD="align: left"]=IFERROR(INDEX($A$2:$A$7,AGGREGATE(15,6,(ROW($A$2:$A$7)-ROW($A$2)+1)/($C$2:$C$7=$F$1), ROWS($F$2:$F2))),"")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thanks for the help - I have managed to sort it out slightly differently via ARRAY

Code:
=IFERROR(INDEX('[Days to clear stock.xlsm]Shipped'!$Q$2:$Q$1172, SMALL(IF(F$1='[Days to clear stock.xlsm]Shipped'!$M$2:$M$1172, ROW('[Days to clear stock.xlsm]Shipped'!$Q$2:$Q$1172)-1,""), ROW()-2)),"")
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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