Need List of top 25 over and top 25 under

mbooth

New Member
Joined
Feb 17, 2015
Messages
5
I am trying to list the top 25 combinations 'over' and 'under' based on the combination in column O by either using the variance in column R or the amount 'over' and 'under' in columns S and T respectively having the top 25 'over' populate in column U and the top 25 under populate in column V.

Note: the number of top "combinations" needs to be able to change from 25 to 10 etc when needed.

IJLMOPQRSTUV
APO Product No-FRZDescriptionRegionalRegional NameCONCAT REGIONAL AND MATERIALTotal Order Qty (cases)Forecast (cases)Variance (cases)3 of cases over fcst# of cases under fcstTop 25 OverTop 25 Under
39677230301PLAIN BAGEL 4.5OZ KOSHER9200000ALBERTSONS LLC92000003967723030100000
39677230318CINNAMON RAISIN BAGEL 4.5OZ KOSHER9200000ALBERTSONS LLC92000003967723031850405045040
39677230325BLUEBERRY BAGEL 4.5OZ KOSHER9200000ALBERTSONS LLC92000003967723032556005605600
39677230417JALAPENO BAGEL 4.5OZ KOSHER9200000ALBERTSONS LLC92000003967723041784008408400
39677030307PLAIN BAGEL 4 5OZ9200004OTHER ONTARIO920000439677030307720-130-13
39677030314CINNAMON RAISIN BAGEL 4 5OZ9200004OTHER ONTARIO9200004396770303141220-80-8

<tbody>
</tbody>

Thank you!!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi Thank you so much!

Question, I changed the formula as I have 3643 rows of data (replacing the 7 rows as advised) I also added column W which is the top 'X' however I noticed that there are two additional columns Max and Min.
What are those being used to reference as when I look at the formula it only references column X (the Max) however nothing from what I can see references column Y (the Min).

Original:
=IF(COUNTIF($X$2:X2,X2)>$W$2,"",INDEX($O$2:$O$7,SMALL(IF(X2=$R$2:$R$7,ROW($R$2:$R$7)-ROW($R$2)+1),COUNTIF($X$2:X2,X2))))

Revised w. rows:
=IF(COUNTIF($X$2:X2,X2)>$W$2,"",INDEX($O$2:$O$3643,SMALL(IF(X2=$R$2:$R$3643,ROW($R$2:$R$3643)-ROW($R$2)+1),COUNTIF($X$2:X2,X2))))

Thank you!!
 
Upvote 0
The reference column Y (the min) is used for Top 25 Under (The Lowest 25 Values) . So if you check the V2 the formula, it is;

=IF(COUNTIF($Y$2:Y2,Y2)>$W$2,"",INDEX($O$2:$O$3643,SMALL(IF(Y2=$R$2:$R$3643,ROW($R$2:$R$3643)-ROW($R$2)+1),COUNTIF($Y$2:Y2,Y2))))

Regards
 
Upvote 0
The reference column Y (the min) is used for Top 25 Under (The Lowest 25 Values) . So if you check the V2 the formula, it is;

=IF(COUNTIF($Y$2:Y2,Y2)>$W$2,"",INDEX($O$2:$O$3643,SMALL(IF(Y2=$R$2:$R$3643,ROW($R$2:$R$3643)-ROW($R$2)+1),COUNTIF($Y$2:Y2,Y2))))

Regards

Thanks Again! Sorry I have one more question. Both formulas are working however I am not seeing the 1 - 25 ranking so to speak. It appears as though it is populating with the Concat from Column O.

Really appreciate the help!!
 
Upvote 0
It's my mistake sorry. As I told I was in a hurry and didn't have time to check it. So you just need to change the first COUNTIF($Y$2:Y2,Y2)>$W$2 with ROWS($U$2:U2)>$W$2. Finally your formulas are,

For the cell U2 =IF(ROWS($U$2:U2)>$W$2,"",INDEX($O$2:$O$3643,SMALL(IF(X2=$R$2:$R$3643,ROW($R$2:$R$3643)-ROW($R$2)+1),COUNTIF($X$2:X2,X2))))
For the cell V2 =IF(ROWS($V$2:V2)>$W$2,"",INDEX($O$2:$O$3643,SMALL(IF(Y2=$R$2:$R$3643,ROW($R$2:$R$3643)-ROW($R$2)+1),COUNTIF($Y$2:Y2,Y2))))

Regards
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,051
Latest member
excelquestion515

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