Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto sort? | About this forum | |||
Is there a way to Auto sort or save a sort? | Excel Discussion (Misc queries) | |||
Auto Sort | Excel Worksheet Functions | |||
Auto-Sort Won't Sort All Column Cells | Excel Discussion (Misc queries) | |||
auto sort | Excel Discussion (Misc queries) |