Database query

PatrickTT

New Member
Joined
Oct 7, 2020
Messages
19
Office Version
  1. 365
Platform
  1. Windows
Hi, I'm looking to extract the supplier info from the below sample table.

IngredientSupplier
ApplesSchroeders
OrangesMcCarthys
ApplesPeters
TomatoesMcCabes
OrangesThomassons
OrangesHendersons

I would like to format the info as per the below:
Is there a formula for this?
IngredientSupplier 1Supplier 2Supplier 3
ApplesSchroedersPeters
OrangesMcCarthysThomassonsHendersons
TomatoesMcCabes
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Do you have the new functions such as VSTACK yet?
 
Upvote 0
Ok, how about
Fluff.xlsm
ABCDEFG
1IngredientSupplier
2ApplesSchroedersApplesSchroedersPeters
3OrangesMcCarthysOrangesMcCarthysThomassonsHendersons
4ApplesPetersTomatoesMcCabes
5TomatoesMcCabes
6OrangesThomassons
7OrangesHendersons
8
Data
Cell Formulas
RangeFormula
D2:D4D2=UNIQUE(A2:A7)
E2:F2,E4,E3:G3E2=TRANSPOSE(FILTER(B2:B7,A2:A7=D2))
Dynamic array formulas.
 
Upvote 0
Ok, how about
Fluff.xlsm
ABCDEFG
1IngredientSupplier
2ApplesSchroedersApplesSchroedersPeters
3OrangesMcCarthysOrangesMcCarthysThomassonsHendersons
4ApplesPetersTomatoesMcCabes
5TomatoesMcCabes
6OrangesThomassons
7OrangesHendersons
8
Data
Cell Formulas
RangeFormula
D2:D4D2=UNIQUE(A2:A7)
E2:F2,E4,E3:G3E2=TRANSPOSE(FILTER(B2:B7,A2:A7=D2))
Dynamic array formulas.
Hi, this works perfectly apart from one problem.
If ingredients are repeated and are sourced from the same file, then the formula also repeats them. See below:

IngredientSupplier
ApplesSchroedersIngredientSupplier 1Supplier 2Supplier 3Supplier 4
OrangesMcCarthysApplesSchroedersPetersSchroeders
ApplesPetersOrangesMcCarthysThomassonsHendersonsThomassons
TomatoesMcCabesTomatoesMcCabes
OrangesThomassons
OrangesHendersons
OrangesThomassons
ApplesSchroeders
 
Upvote 0
Ok, how about
Excel Formula:
=TRANSPOSE(unique(FILTER(B2:B7,A2:A7=D2)))
 
Upvote 0
Solution
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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