I am trying to create a VLOOKUP that returns multiple names when it matches with a color while using a drop down list.
I created this down list.
and associated VLOOKUP to reference the drop down list, but I know that it can only return one value at a time. Is there a way to go about returning multiple values?
So Basically if I'd like when I select a color from the drop down list to return this.
As you can see from my VLOOKUP, I'm referencing this table array on another sheet.
Any help would be greatly appreciated. I hope I provided enough information, if not please let me know and I'll provide as needed.
Thanks!
Try using this =IFERROR(INDEX('Customer Health Data'!$A$3:$A$36, SMALL(IF($A$1='Customer Health Data'!$C$3:$C$37, ROW('Customer Health Data'!$C$3:$C$37)-ROW('Customer Health Data'!$C$3)+1), ROW(1:1))),"" )
Press Ctrl + Shift + Enter and copy it to below cells.
If Cell A1
= Yellow then the list of data with Yellow appears
Sample data sheet for Customer Health Data
Vlookup
won't be able to do it, without a lot of tweaking. Instead, you can use an Index
formula, with Small
.
This is a simple example, so adjust the ranges as necessary:
=INDEX($A$1:$A$11,SMALL(IF($B$1:$B$11=$D$1,ROW(B$1:B$11)-ROW(B$1)+1),ROWS(B$1:B1)))
Where: A1:A11
has what you want to return (in your case, the hospital names). B1:B11
has the Colors you want to search with. Note the cell anchoring
Enter as an array formula (with CTRL+SHIFT+ENTER) and drag down. You'll get #NUM
errors once it exhausts your matches, so just wrap IfError([formula],"")
around it to hide that.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.