Sorting based on selection from Drop Down list

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
Good afternoon. I have a dropdown menu in $D$4 allowing users to select from a list of values $S4:$S20 that pulls values from another sheet. You can see the resulting data in D7:K15. Based on the list item the end user selects in D4, the values in D7:K15 will change.

My goal is to sort all data in the table so it's ranked by column K from highest to lowest and I need a formula that would make that happen. Understand that changing the selection in D4 will change the values in column K likely necessitating the formula to resort.

Values in D7:D15 will remain fairly constant over time but would likely change order based on the results of the formula sorting by the values in column K

Thanks in advance

MrExcel.xlsx
ABCDEFKLMNOPQRS
4Brown
5All Market Total5Last MoPrev Mo6 Mo Ave
6Banana1Market Ranking 1Total Revenue
7Cherry1Banana$0$0$0.00`Green
8Peach1Cherry$1,350$1,350$1,750.00Silver
9Coconut1Peach$0$0$0.00 Orange
10Lime1Coconut$0$0$300.00Blue
11Pineapple1Lime$0$0$0.00Red
12Strawberry1Pineapple$1,200$1,200$1,600.00Magenta
13Watermelon1Strawberry$0$0$0.00Purple
14Lemon1Watermelon$0$0$0.00White
15Lemon$0$0$0.00Yellow
16   $0.00Violet
17   $0.00Brown
18   $0.00Chocolate
19 Black
20 Silver
NeedsHelp
Cell Formulas
RangeFormula
E7:E18E7=IFNA(INDEX('Revenue Analysis'!P$2:P$161,MATCH($D7&$D$4,INDEX('Revenue Analysis'!$B$2:$B$161&'Revenue Analysis'!$C$2:$C$161,),0)),"")
F7:F18F7=IFNA(INDEX('Revenue Analysis'!O$2:O$161,MATCH($D7&$D$4,INDEX('Revenue Analysis'!$B$2:$B$161&'Revenue Analysis'!$C$2:$C$161,),0)),"")
K7:K18K7=SUM(E7:J7)/6
B10:B14,B6:B8B6=IFERROR(VLOOKUP($A6,Recap!$A:$B,2,FALSE),"-")
N9N9=IFERROR(INDEX($A$2:$A$4,AGGREGATE(15,6,(ROW($A$2:$A$4)-ROW($A$2)+1)/($B$2:$B$4=COLUMNS($E$2:N$2)),ROWS(N$2:N7))),"")
D7:D20D7=IFERROR(INDEX($A$5:$A$82,AGGREGATE(15,6,(ROW($A$5:$A$82)-ROW($A$5)+1)/($B$5:$B$82=COLUMNS($D$7:D$7)),ROWS(D$7:D7))),"")
Cells with Data Validation
CellAllowCriteria
D4List=$S$6:$S$20
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,214,590
Messages
6,120,421
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