Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Sort Formulas

hi i have seen and tried the auto sort posts here but none seem to work
in mine

then i tried in a new sheet and found that those worked only in
numbers, when i try sorting a formula it doesnt work

i have a table like this:

Name Games Points
Team1 2 9
Team2 2 4
Team3 2 1

and so on; as the points are formulas, related to the game results wich
there are also in the same sheet

is there a way to auto sort those point columns among with the team
name column? the columns are N8 up to V16


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Auto Sort Formulas

leandrocg

you need to copy values. The sub Below copies from range
G1 to I8 to A1:c8 and sorts the results

You can adjust this better yourself

Sub SortLeague()
Range("A1").Select
Range("A1:C8").Value = Range("G1:I8").Value
Selection.Sort Key1:=Range("C2"), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom

End Sub

Regards
Peter
-----Original Message-----
hi i have seen and tried the auto sort posts here but

none seem to work
in mine

then i tried in a new sheet and found that those worked

only in
numbers, when i try sorting a formula it doesnt work

i have a table like this:

Name Games Points
Team1 2 9
Team2 2 4
Team3 2 1

and so on; as the points are formulas, related to the

game results wich
there are also in the same sheet

is there a way to auto sort those point columns among

with the team
name column? the columns are N8 up to V16


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Auto Sort Formulas

Do you have Absolute References? Change them to Relative. Then the sort
should work as long as all the variables are in the same row.

Sub TeamSort()

Application.Goto Reference:="TeamTable" 'Dynamic Range N$7$:V$16$
with headers

'Sorts by Points (descending) then by Team (Ascending)

Selection.Sort Key1:=Range("P8"), Order1:=xlDescending,
Key2:=Range("N8") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
End Sub

Jon

leandrocg < wrote:

hi i have seen and tried the auto sort posts here but none seem to work
in mine

then i tried in a new sheet and found that those worked only in
numbers, when i try sorting a formula it doesnt work

i have a table like this:

Name Games Points
Team1 2 9
Team2 2 4
Team3 2 1

and so on; as the points are formulas, related to the game results wich
there are also in the same sheet

is there a way to auto sort those point columns among with the team
name column? the columns are N8 up to V16


---
Message posted from http://www.ExcelForum.com/




--
42°57N 81°16W


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Sort Formulas

but i need to use absolute references, because if i use relatives, the
formulas get all messed up when i sort the table...

thx i will try your help


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Sort Formulas

hey guys, i tried you both macros but it didnt work...

what i really needed is a macro that would auto sort some formulas tha
use absolute reference (like the points), and copy the other value
among with them (like the team name, games etc.)

this is really getting me mad :

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Sort Formulas

that's ok i got it fixed!
thx

--
Message posted from http://www.ExcelForum.com

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
Auto sort? Paul Garratt About this forum 0 January 31st 11 02:58 PM
Is there a way to Auto sort or save a sort? Barbie Excel Discussion (Misc queries) 11 December 1st 09 09:48 PM
Auto Sort LiAD Excel Worksheet Functions 1 January 7th 09 04:25 PM
Auto-Sort Won't Sort All Column Cells TikiTembo Excel Discussion (Misc queries) 1 March 25th 08 07:00 PM
auto sort Mike Excel Discussion (Misc queries) 3 June 26th 06 04:14 PM


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