Home |
Search |
Today's Posts |
#1
|
|||
|
|||
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
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Does excel recognise names rather than cells? | Excel Worksheet Functions | |||
Pulling data from 1 sheet to another | Excel Worksheet Functions | |||
Linking sheets when sorting row and column data | Excel Worksheet Functions | |||
pull data from sheet two, then fill in the data to sheet one (part | Excel Worksheet Functions | |||
Naming & renaming a sheet tab | Excel Worksheet Functions |