Noxqss38242
Board Regular
- Joined
- Sep 15, 2017
- Messages
- 223
- Office Version
- 2016
Currently the macro, when button is selected, will arrange data in largest to smallest.
I want it to actually arrange smallest to largest.
Here are the macros that may be the culprit:
Sub srtdeviation()
'
' srtdeviation Macro
'
'
ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort.SortFields. _
Add2 Key:=Range("Table1[[#All],[SRT DEVIATION]]"), SortOn:=xlSortOnValues, _
Order:=xlAcending, DataOption:=xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
AND.....
Sub SortSRTDev()
'
' SortSRTDev Macro
'
'
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=24, Criteria1:= _
">-50", Operator:=xlAnd
End Sub
What's the fix?
I want it to actually arrange smallest to largest.
Here are the macros that may be the culprit:
Sub srtdeviation()
'
' srtdeviation Macro
'
'
ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort.SortFields. _
Clear
ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort.SortFields. _
Add2 Key:=Range("Table1[[#All],[SRT DEVIATION]]"), SortOn:=xlSortOnValues, _
Order:=xlAcending, DataOption:=xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("VMRSMAIL").ListObjects("Table1").Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
AND.....
Sub SortSRTDev()
'
' SortSRTDev Macro
'
'
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=24, Criteria1:= _
">-50", Operator:=xlAnd
End Sub
What's the fix?