Turning off sort warnings.

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?
 
B

Bernie Deitrick

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
 

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