ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel AutoSort Macros (https://www.excelbanter.com/excel-programming/314275-excel-autosort-macros.html)

Corinne[_2_]

Excel AutoSort Macros
 
To Whom May Wish to Assist:

I have multiple tables in one Excel 2002 worksheet. The tables are
"paste linked" and/or include formulas (sums, averages, percent
changes) and change when a single column of data in a separate table
is updated.

For example:

Table I. of formulas:

A B C D E F G
X1 X2 X3 X4 X5 Avg
1) Alice B6/x C6/x D6/x E6/x F6/x G6/x
2) Colin B7/x C7/x D7/x E7/x F7/x G7/x
3) Brett B8/x C8/x D8/x E8/x F8/x G8/x

Table II. of paste linked data:

A B C D E F G
X1 X2 X3 X4 X5 X6 Totals
6) Alice 8 5 3 7 $B$11 Totals
7) Colin 4 3 7 8 $B$13 Totals
8) Brett 9 6 2 1 $B$12 Totals
9) Totals Sum Sum Sum Sum Sum Totals
10) Averages Avg Avg Avg Avg Avg Avg

Table III. Entered Daily:

A B
11) Alice 8
12) Brett 5
13) Colin 3

I wish the "Average" column result in Table I. and the "Totals" column
result in Table II. to auto-sort in descending order upon the data in
Table III. being updated.

Advice?

Thanks in advance,
Corinne

Pete

Excel AutoSort Macros
 
I don't know if you can automate it simply based on Table III being updated,
but you can certainly write a macro to run the two sorts. Simply select
Tools and Record Macro, and give a CTL key designation (e.g. CTL U to update)
and then you do not have to go through all the keystrokes ever again--just do
them the one last time for that macro, close out the macro, and in the future
just hit CTL-U to run it.

This presupposes that you are not adding rows with new data. Though if you
are, you could certainly write the macro to extend down to extra blank rows,
since when you sort descending they won't show up in the results.

Hope this helps.

Regards,
Peter

"Corinne" wrote:

To Whom May Wish to Assist:

I have multiple tables in one Excel 2002 worksheet. The tables are
"paste linked" and/or include formulas (sums, averages, percent
changes) and change when a single column of data in a separate table
is updated.

For example:

Table I. of formulas:

A B C D E F G
X1 X2 X3 X4 X5 Avg
1) Alice B6/x C6/x D6/x E6/x F6/x G6/x
2) Colin B7/x C7/x D7/x E7/x F7/x G7/x
3) Brett B8/x C8/x D8/x E8/x F8/x G8/x

Table II. of paste linked data:

A B C D E F G
X1 X2 X3 X4 X5 X6 Totals
6) Alice 8 5 3 7 $B$11 Totals
7) Colin 4 3 7 8 $B$13 Totals
8) Brett 9 6 2 1 $B$12 Totals
9) Totals Sum Sum Sum Sum Sum Totals
10) Averages Avg Avg Avg Avg Avg Avg

Table III. Entered Daily:

A B
11) Alice 8
12) Brett 5
13) Colin 3

I wish the "Average" column result in Table I. and the "Totals" column
result in Table II. to auto-sort in descending order upon the data in
Table III. being updated.

Advice?

Thanks in advance,
Corinne



All times are GMT +1. The time now is 02:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com