Sorting based on a drop down list

  • Thread starter Thread starter Randall Roberts
  • Start date Start date
R

Randall Roberts

how can i have excel sort a work sheet based on a selection from a
drop down list
The selections in the list would be the same as the headers on the
sheet
 
What is your drop down list yielding? Guess might be the column you want. If
so, I have a better solution.
right click on sheet tab>view code>insert this>SAVE
Create a defined name for your sortrange. Then, select the column and double
click to sort on the column.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel
As Boolean)
[sortrange].Sort Key1:= _
Cells(1, activecell.column), Order1:=xlAscending, Orientation:=xlTopToBottom
End Sub
 
Back
Top