Sorting based on a drop down list

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
 
D

Don Guillett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top