Turning off sort warnings.

  • Thread starter Thread starter Troy
  • Start date Start date
T

Troy

I am using Excel 2002 and trying to sort a single column
with text in a column next to the original column. When I
do it pops up a warning that reads "Microsoft Excel found
data next to your selection. Since you have not selected
this data, it will not be sorted. What do you want to do?
Expand the selection or continue with the current
selsction." Can I turn this warning off? If so, how do I
turn it off?
 
Troy,

You can't turn off that warning, but you can use a macro, that you can
assign to a custom commandbar button:

Sub MySort()
Selection.Sort Key1:=Selection.Range("A1"), _
Order1:=xlDescending, _
Header:=xlGuess
' or use xlAscending for order,
' and xlNo or XlYes for header
End Sub

HTH,
Bernie
MS Excel MVP
 
Back
Top