_karl_

New Member
Joined
Sep 30, 2016
Messages
5
Hello everyone-

I'm not quite sure how to phrase my question, so I'll ask by way of an example.

Let's say I have a dynamic data set like the one below. (Assume people are always adding, deleting, and changing entries.)

TypeItem
FruitApple
VegetableCucumber
VegetablePotato
FruitPeach
VegetableZucchini

<colgroup><col width="79" span="2" style="width:60pt"> </colgroup><tbody>
</tbody>


Now, I want these lists to automatically populate:
FruitVegetable
AppleCucumber
PeachPotato
Zucchini

<colgroup><col width="79" span="2" style="width:60pt"> </colgroup><tbody>
</tbody>


What formula would I enter under "Fruit" and "Vegetable" to accomplish this? Keep in mind that the number of fruits and vegetables is continuously changing. I have a feeling that it's going to take some sort of vlookup array formula, but I can't wrap my brain around it. I know that I could create a pivot table & add some VB to automatically refresh it when the data changes, but I'd like to handle this with a formula.

Thanks in advance for your help!
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
maybe something like this?
A​
B​
C​
D​
E​
1​
TypeItemFruitVegetable
2​
FruitAppleAppleCucumber
3​
VegetableCucumberPeachPotato
4​
VegetablePotatoZucchini
5​
FruitPeach
6​
VegetableZucchini
D2=IFERROR(INDEX($B:$B,SMALL(IF($A$2:$A$6=D$1,ROW($A$2:$A$6)),ROWS($A$1:A1))),"")
ARRAY entered using CTRL SHIFT ENTER, not just enter
Then copy down - then copy all of that across
 
Upvote 0
In that exact situation, it works; however, when I tried to apply it to my actual situation, I can't get it to work. Would anyone mind taking a look at the actual file? (Link below.) I'm trying to populate the yellow highlighted cells. I already attempted to modify the formula above & left that in there so you can spot any possible error. Thank you!

https://drive.google.com/drive/folders/0B4aiHbtOklZYN1lHWFEtcC1Va3M?usp=sharing
 
Upvote 0
You use this formula:

=IFERROR(INDEX(MaterialsMaster!$B2:$B250,SMALL(IF(MaterialsMaster!$A$2:$A$250=A$1,ROW(MaterialsMaster!$A$2:$A$250)),ROWS(MaterialsMaster!$A$2:$A$250))),"")

and Ford gave you this formula:

=IFERROR(INDEX(MaterialsMaster!$B2:$B250,SMALL(IF(MaterialsMaster!$A$2:$A$250=A$1,ROW(MaterialsMaster!$A$2:$A$250)),ROWS(A$1:A1))),"")


ARRAY entered using CTRL SHIFT ENTER, not just enter
Then copy down - then copy all of that across
 
Last edited:
Upvote 0
Cannot view your file, but what exactly did not work?

Based on Ingold's comment (thanks for that), you did not get the last argument right?

Also, change this...
=IFERROR(INDEX(MaterialsMaster!$B2:$B250,SMALL(IF(MaterialsMaster!$A$2:$A$250=A$1,ROW(MaterialsMaster!$A$2:$A$250)),ROWS(A$1:A1))),"")
to this...
=IFERROR(INDEX(MaterialsMaster!$B:$B,SMALL(IF(MaterialsMaster!$A$2:$A$250=A$1,ROW(MaterialsMaster!$A$2:$A$250)),ROWS(A$1:A1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,592
Messages
6,120,433
Members
448,961
Latest member
nzskater

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