Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default can I set up a sort command to happen by clicking on a table headi

I have a table I would like to set up to be sorted by clicking on a table
heading. Is that possible in Excel?


Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default can I set up a sort command to happen by clicking on a table headi

In Excel 2003 you can create a list and have functionality very similar to
this I believe.

--
Regards,
Tom Ogilvy


"Aaron" wrote in message
...
I have a table I would like to set up to be sorted by clicking on a table
heading. Is that possible in Excel?


Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default can I set up a sort command to happen by clicking on a table headi

Let's assume that you have 3 headers in cells a1,b1, and c1. The following
are the steps to take:

1)Select a1
2) Insert Hyperlink
3) Choose "Place in this document"
4) type the activecell's address in the "Type the cell reference" box (a1 in
this instance)
5) Click OK
6) Repeat this for all headers substituting the correct cell reference
7) Write (or record) macros to sort based on each heading
8) Right-Click on the table's sheet tab and select "View Code"
9) Paste the following:

Private Sub Worksheet_FollowHyperlink(ByVal TArget As Hyperlink)
If Not Intersect(Target.Parent, Range("A1")) Is Nothing Then
SortA1 'replace with the name of you sub to sort the first column
end if

if Not Intersect(Target.Parent, Range("B1")) Is Nothing Then
SortB1 'again replace with appropriate sub
end if
'continue for all headings that you have

end sub

hope that helps. I found this on another post in this NG called "Can a
Hyperlink run a macro?" I searched for "hyperlink for macro" to find it.

JNW

"Aaron" wrote:

I have a table I would like to set up to be sorted by clicking on a table
heading. Is that possible in Excel?


Thank you.

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
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
Auto data sort by clicking on column Jack C Excel Discussion (Misc queries) 2 August 29th 07 01:02 PM
Can I set up a sort by clicking on table a heading Aaron Excel Worksheet Functions 5 November 4th 05 12:40 AM
Keyboard command to replace double clicking the fill handle Pat Excel Discussion (Misc queries) 1 May 18th 05 05:50 PM
Can I display the file properties of a workbook in a custom headi. Sings4Fun Excel Worksheet Functions 2 April 16th 05 05:24 PM


All times are GMT +1. The time now is 12:28 PM.

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

About Us

"It's about Microsoft Excel"