C
Craig Brandt
I have a table of selected stocks with associated data. I would like to
highlight, with background color, the parameters that are the best in class
(Green) as well as those that are worst in class (Yellow).
To accomplish this I cycle through the columns and sort the table by the
parameter, then simply number a copy of the chart layout in assending
numbers, then go to the next parameter. When this is done I should have two
identical tables, one wuth the values and the other with that values
respective position. I then use conditionals in the value table to look at
the position and color code those parameters that have a ranking of 1-10,
green and the last 10 in yellow.
Value table in AT3:BA106 [Range(Cells(3,46),Cells(MaxSymbols,53))]
Ranking table BB3:BI106
MaxSymbols = 106
Public Sub RankBySTDEV()
Sheets("Param").Select
Range(Cells(3, 46), Cells(MaxSymbols, 61)).Select
Selection.Sort Key1:=Cells(3, 48), Order1:=xlAscending
Cells(3, 56).FormulaR1C1 = "1"
Cells(4, 56).FormulaR1C1 = "2"
Range(Cells(3, 56), Cells(4, 56)).AutoFill Destination:=Range(Cells(3,
56), Cells(MaxSymbols, 56)), Type:=xlFillDefault
End Sub
Problem: The procedure doesn't seem to wait for the sort to complete before
it assigns the "static" ranking values.
Any ideas?
Craig
highlight, with background color, the parameters that are the best in class
(Green) as well as those that are worst in class (Yellow).
To accomplish this I cycle through the columns and sort the table by the
parameter, then simply number a copy of the chart layout in assending
numbers, then go to the next parameter. When this is done I should have two
identical tables, one wuth the values and the other with that values
respective position. I then use conditionals in the value table to look at
the position and color code those parameters that have a ranking of 1-10,
green and the last 10 in yellow.
Value table in AT3:BA106 [Range(Cells(3,46),Cells(MaxSymbols,53))]
Ranking table BB3:BI106
MaxSymbols = 106
Public Sub RankBySTDEV()
Sheets("Param").Select
Range(Cells(3, 46), Cells(MaxSymbols, 61)).Select
Selection.Sort Key1:=Cells(3, 48), Order1:=xlAscending
Cells(3, 56).FormulaR1C1 = "1"
Cells(4, 56).FormulaR1C1 = "2"
Range(Cells(3, 56), Cells(4, 56)).AutoFill Destination:=Range(Cells(3,
56), Cells(MaxSymbols, 56)), Type:=xlFillDefault
End Sub
Problem: The procedure doesn't seem to wait for the sort to complete before
it assigns the "static" ranking values.
Any ideas?
Craig