Sort rows from validation list value, but not using the Worksheet_SelectionChange?

buckwheat4948

New Member
Joined
Jun 10, 2011
Messages
14
Is it possible to either create a validation that sorts the rows depending on the value selected, but not using the Worksheet_SelectionChange or activating a macro when clicking on cell A9, but from the workbook_activate?

Oh im stupid, i think i can use formula 2 from the validation list to sort rows based on the value clicked?

Basically I have a workbook that creates sheets automatically every so often. The workbook creates sheets with data, but i'd like the sheet to be completely automated.

Id like to sort rows A10:$A$20 based on the value clicked on the validation list.

The workbook creates a validation list in the new sheets by:
With NewSheet.Range("A9").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:=strList
.IgnoreBlank = True
.InCellDropdown = True
End With

Or can i add code to the Worksheet_SelectionChange from the workbook_activate? Or maybe another option...

Thanks!
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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