Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Auto data sort by clicking on column

Apparently I can set up a spreadsheet to sort data by placing hot key in the
column indicator cell. (Similar to the newest on top in outlook)
How do I do this??
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Auto data sort by clicking on column

In xl2003, you can apply data|filter|autofilter to the range and use the
dropdown arrow to sort your data.

Debra Dalgleish has a technique at her site that adds invisible rectangles in
the headers and then sorts the data by that field when you click on one of those
rectangles.

http://contextures.com/xlSort02.html

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Jack C wrote:

Apparently I can set up a spreadsheet to sort data by placing hot key in the
column indicator cell. (Similar to the newest on top in outlook)
How do I do this??


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 477
Default Auto data sort by clicking on column

Here's a small example where I have a table (with 1 row headers) over
Range A1:F7 << Post below code into the Sheet Module Code window.

Simply Right-Click on any Column Header Row (Row 1 in this case)
HTH

Jim May

Private Sub Worksheet_BeforeRightClick(ByVal Target As Range, Cancel As
Boolean)
Cancel = True
If Not Intersect(Target, Range("A1:F1")) Is Nothing Then
SortCol = ActiveCell.Column
With ActiveSheet.Range("A1").CurrentRegion
.Sort Key1:=Target.Value, Order1:=xlAscending, Header:=xlGuess,
OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
End With
End If
End Sub

"Jack C" wrote:

Apparently I can set up a spreadsheet to sort data by placing hot key in the
column indicator cell. (Similar to the newest on top in outlook)
How do I do this??

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic column chart - auto sort on data range jimfrog Charts and Charting in Excel 0 March 29th 06 02:45 PM
Auto-Import and sort data in Excel NJ Desi Bhai Excel Worksheet Functions 1 March 8th 06 05:33 PM
How to AUTO SORT A-Z new data in a column (not menual sorting) Nir Excel Worksheet Functions 2 November 8th 05 11:29 PM
Can I set up a sort by clicking on table a heading Aaron Excel Worksheet Functions 5 November 4th 05 01:40 AM
Help:macro to auto sort data to different worksheets... 2nd Time Around Excel Discussion (Misc queries) 2 August 6th 05 12:31 PM


All times are GMT +1. The time now is 05:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"