Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Help with Macro for sorting

Hello:
I have data that is inserted weekly into a new worksheet in the same
workbook. This data is aggregated into a single worksheet. The final
worksheet is 2 columns. Column A has the person's name, and Column B has the
total for the person. I have a macro set to automatically sort by Column B
when the worksheet is selected.

What I would like to do is have a third column that would tell me how many
spots an individual gained or lost from the previous week. I would like for
this process to happen automatically when the worksheet is selected if
possible. For example:

A B C

John 27 +3
Sallie 31 -1


Any ideas?

Thanks.....
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Help with Macro for sorting

Hi Brad

Try the below workaround...Below mentioned are the assumptions/criterias...

--The weekly sheets are named as 'Week01' 'Week02' (2 digit numerics)

--Try the below formula in sheet 'Week02' C2. The below formula will compare
the value of 'Week02' B2 aganist the value for the name in Sheet 'Week01' and
display the difference

=B2-SUMIF(INDIRECT("'Week" & TEXT(RIGHT(CELL("filename",$A$1),2)-1,"00") &
"'!A:A"),A2,INDIRECT("'Week" & TEXT(RIGHT(CELL("filename",$A$1),2)-1,"00") &
"'!b:b"))

--If you want to mention the difference as +, - or = then select Column C
FormatCellsCustomType:


+#;-#;"="

If this post helps click Yes
---------------
Jacob Skaria


"Brad" wrote:

Hello:
I have data that is inserted weekly into a new worksheet in the same
workbook. This data is aggregated into a single worksheet. The final
worksheet is 2 columns. Column A has the person's name, and Column B has the
total for the person. I have a macro set to automatically sort by Column B
when the worksheet is selected.

What I would like to do is have a third column that would tell me how many
spots an individual gained or lost from the previous week. I would like for
this process to happen automatically when the worksheet is selected if
possible. For example:

A B C

John 27 +3
Sallie 31 -1


Any ideas?

Thanks.....

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 846
Default Help with Macro for sorting

Thanks Jacob,
I am running a race pool, and the worksheets are named for the location of
the race, ie Daytona, Charlotte.. I have a formula there that looks to the
race results and matches each person's picks with the finishing position.

I have the results linked to a worksheet that has each person in the pool
and total them there. This worksheet is not sorted. That worksheet named
"Totals"

That's where I pull the numbers for the worksheet I'm sorting. It's titled
"Standings" The standings worksheet is the only worksheet that is sorted..

I hope that makes sense..

"Jacob Skaria" wrote:

Hi Brad

Try the below workaround...Below mentioned are the assumptions/criterias...

--The weekly sheets are named as 'Week01' 'Week02' (2 digit numerics)

--Try the below formula in sheet 'Week02' C2. The below formula will compare
the value of 'Week02' B2 aganist the value for the name in Sheet 'Week01' and
display the difference

=B2-SUMIF(INDIRECT("'Week" & TEXT(RIGHT(CELL("filename",$A$1),2)-1,"00") &
"'!A:A"),A2,INDIRECT("'Week" & TEXT(RIGHT(CELL("filename",$A$1),2)-1,"00") &
"'!b:b"))

--If you want to mention the difference as +, - or = then select Column C
FormatCellsCustomType:


+#;-#;"="

If this post helps click Yes
---------------
Jacob Skaria


"Brad" wrote:

Hello:
I have data that is inserted weekly into a new worksheet in the same
workbook. This data is aggregated into a single worksheet. The final
worksheet is 2 columns. Column A has the person's name, and Column B has the
total for the person. I have a macro set to automatically sort by Column B
when the worksheet is selected.

What I would like to do is have a third column that would tell me how many
spots an individual gained or lost from the previous week. I would like for
this process to happen automatically when the worksheet is selected if
possible. For example:

A B C

John 27 +3
Sallie 31 -1


Any ideas?

Thanks.....

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
sorting with macro button vcff Excel Discussion (Misc queries) 10 October 18th 07 04:12 PM
Sorting with a macro or a formula Shu of AZ Excel Discussion (Misc queries) 8 January 7th 07 08:16 PM
Macro sorting by 4 columns dcbpe Excel Discussion (Misc queries) 2 June 27th 06 02:52 PM
sorting using macro Ross Excel Discussion (Misc queries) 2 September 15th 05 10:13 PM
macro for sorting cherrynich Excel Discussion (Misc queries) 1 December 30th 04 04:47 PM


All times are GMT +1. The time now is 08:34 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"