Index Small If Row Horizontally with no Duplicates

lbrockmeier

New Member
Joined
Dec 18, 2017
Messages
7
Hi there,

Would really appreciate any help with this!

I have 2 sheets: Combined Data and VGBB Summary. The snapshot below is VGBB summary. What I need to do is bring over all of the prices associated with each category (e.g. Accessories) to the right of the category. My issue is that there are multiple duplicates of prices for each category. I would like for prices to populate to the right of the category with no duplicates!
Category
Accessories7.997.997.997.99
Pants19.99
Shirts14.99

<tbody>
</tbody>


Here is the formula I am currently using:

=IFERROR(INDEX('Combined Data'!$A$6:$Q$11959,SMALL(IF('Combined Data'!$Q$7:$Q$11959='VGBB Summary (2)'!$A2,ROW('Combined Data'!$Q$7:$Q$11959)),ROW(1:1))-1,13),"")

Any help is greatly appreciated
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Maybe something like this.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.

Excel Workbook
ABCD
1Category
2Accessories7.998.00
3Pants25.0026.00
4Shirts15.50
Sheet1
Excel Workbook
AB
1CategoryPrice
2Accessories7.99
3Pants25.00
4Shirts15.50
5Accessories7.99
6Pants26.00
7Shirts15.50
8Accessories8.00
9Pants26.00
10Shirts15.50
Sheet2
 
Upvote 0
Maybe something like this.
This is an array formula and must be entered with CTRL-SHIFT-ENTER.

Sheet1

ABCD
1Category
2Accessories7.998.00
3Pants25.0026.00
4Shirts15.50

<colgroup><col style="width:30px; "><col style="width:92px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B2{=IFERROR(INDEX(Sheet2!$B$2:$B$10,SMALL(IF(FREQUENCY(IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10),Sheet2!$B$2:$B$10),ROW(Sheet2!$B$2:$B$10)-ROW(Sheet2!$B$2)+1),COLUMNS($B$2:B2))),"")}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Sheet2

AB
1CategoryPrice
2Accessories7.99
3Pants25.00
4Shirts15.50
5Accessories7.99
6Pants26.00
7Shirts15.50
8Accessories8.00
9Pants26.00
10Shirts15.50

<colgroup><col style="width:30px; "><col style="width:109px;"><col style="width:64px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


Thank you so much for this! It worked perfectly. However, is there a way to update the formula so that prices increase from left to right in ascending order?

Right now, this is what I am seeing:

ABCD
1CategoryPrice
2Accessories24.9916.9912.99
3Pants24.9916.9919.99
4Shorts

<tbody>
</tbody>





****** id="cke_pastebin" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">AB1CategoryPrice2Accessories7.993Pants25.004Shirts15.505Accessories7.996Pants26.007Shirts15.508Accessories8.009Pants26.0010Shirts15.50</body>
 
Upvote 0
Sorry I don't know away to sort in the order you want. Other than to sort your data sheet first.
Someone else on the forum may know a formula way to do this.
 
Upvote 0
In B2 of Sheet1 control+shift+enter, not just enter, copy across, and down:

=IF(COLUMNS($B2:B2)>SUM(IF(FREQUENCY(IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10),IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10)),1)),"",MIN(IF(ISNA(MATCH(IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10),$A2:A2,0)),IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10))))
 
Upvote 0
In B2 of Sheet1 control+shift+enter, not just enter, copy across, and down:

=IF(COLUMNS($B2:B2)>SUM(IF(FREQUENCY(IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10),IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10)),1)),"",MIN(IF(ISNA(MATCH(IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10),$A2:A2,0)),IF(Sheet2!$A$2:$A$10=$A2,Sheet2!$B$2:$B$10))))


Thank you! Works perfectly!
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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