Dear all,
I have troubles with sorting..
Actually what I need is to sort by row... The row is supposed to be picked up from the drop-down list. Let say in C8..
These factors I have in rows 91:97.
I make from these rows graphs by selecting and filtering in drop-down list..
But I have to have the graphs sorted - descending..
I try to modify some code, but it doesn´t work..
I´m pretty unhappy because I really try hard..
Could you please anyone help? Thank you very much!
I have troubles with sorting..
Actually what I need is to sort by row... The row is supposed to be picked up from the drop-down list. Let say in C8..
These factors I have in rows 91:97.
I make from these rows graphs by selecting and filtering in drop-down list..
But I have to have the graphs sorted - descending..
I try to modify some code, but it doesn´t work..
HTML:
Range("C8").Select
Selection.Copy
ActiveSheet.Range("$A$90:$S$97").AutoFilter Field:=1, Criteria1:=Selection
ActiveWorkbook.Worksheets("Branch selection").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Branch selection").Sort.SortFields.Add Key:=Range( _
"A90:S97"), SortOn:=xlSortOnValues, Order:=xlDescending, CustomOrder:=xlmyVar1, Orientation:=xlLeftToRight, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Branch selection").Sort
.SetRange Range("A90:S97")
.Header = xlYes
.MatchCase = False
.Orientation = xlLeftToRight
.SortMethod = xlPinYin
.Apply
End With
I´m pretty unhappy because I really try hard..
Could you please anyone help? Thank you very much!