Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Problems

Status
Not open for further replies.

bpeirson

Structural
Joined
Apr 7, 2003
Messages
147
Location
CA
I have 3 lists of information on a worksheet in Excel. I want to sort each list independantly of the other lists (they are in columns A, B & C). When I select the list in column B and choose Data-->Sort Excel changes my selection to include columns A & C. Excel used to ask if I wanted to sort the adjacent cells but it is no longer asking.

How can I override Excel and force a single column sort.

My data is referenced by a VBA subroutine so if I move the data I will have to rewrite the code, I'd rather not do that.

Any help is appreciated (Excel's built in help has not been helpful).
 
I'm not seeing that.

Sub Macro2()
Selection.Sort Key1:=ActiveCell, Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

sorts on a single column if that's what's selected

TTFN



 
I wasn't sorting with the macro, all sorting was done manually.

I found the problem, the workbook was shared. After unsharing the workbook all things returned to normal, or at least what passes for normal in the Excel environment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top