Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Graham Mason
 
Posts: n/a
Default Sorting data in a master sheet

I have a Workbook with a number of worksheets linked to a master sheet at
the front. If any data changes in any of the worksheets, I would like to
sort automatically on the master sheet, i.e. if a date changes I would like
to sort the dates in their new order. Can this be done?
Using Excel 2003


  #2   Report Post  
JMB
 
Posts: n/a
Default

you could right click the master sheet tab, select view code, and paste the
following into the code table.

Private Sub Worksheet_Calculate()
Sheet1.Columns("A:A").Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

The range to be sorted (Sheet1.Columns("A:A")) will need to be changed
depending on the dimensions of your table (Sheet1.Range("A1:H50") - for
example). Also, you'll need to change the Key range. If your table
dimensions are dynamic, you'll likely not want to hardcode the range to be
sorted.


"Graham Mason" wrote:

I have a Workbook with a number of worksheets linked to a master sheet at
the front. If any data changes in any of the worksheets, I would like to
sort automatically on the master sheet, i.e. if a date changes I would like
to sort the dates in their new order. Can this be done?
Using Excel 2003



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
Does excel recognise names rather than cells? Sue Excel Worksheet Functions 9 May 22nd 05 04:51 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Linking sheets when sorting row and column data Sean 3DD Excel Worksheet Functions 0 January 5th 05 12:21 PM
pull data from sheet two, then fill in the data to sheet one (part Jim Excel Worksheet Functions 3 December 11th 04 04:51 AM
Naming & renaming a sheet tab Cgbilliar Excel Worksheet Functions 1 November 7th 04 05:57 PM


All times are GMT +1. The time now is 01:18 AM.

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"