ironsides
Well-known Member
- Joined
- Aug 12, 2002
- Messages
- 575
I copy and paste market cap data from NASDAQ and paste the results in col H The results I get when sorted is:
96,323 M
9,128 M
833 M
670 M
613 M
530 M
47,681 M
How do I replace the M with ,000 so when sorted it will be correct? Begins in cell H19
The macro I'm using is:
Sub SortH()
'
' SortH Macro
'
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range( _
"H19:H9999"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A19:AZZ9999")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("F5").Select
ActiveWorkbook.Worksheets("Sheet1").Range("H19").Select
End Sub
or is there another way to handle this?
96,323 M
9,128 M
833 M
670 M
613 M
530 M
47,681 M
How do I replace the M with ,000 so when sorted it will be correct? Begins in cell H19
The macro I'm using is:
Sub SortH()
'
' SortH Macro
'
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range( _
"H19:H9999"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Sheet1").Sort
.SetRange Range("A19:AZZ9999")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("F5").Select
ActiveWorkbook.Worksheets("Sheet1").Range("H19").Select
End Sub
or is there another way to handle this?