Forum Discussion
Odintsov_Maksim
May 23, 2020Copper Contributor
Large amount of data sorting
Please, help. Need to sort numeric data contained in large numbers (several thousand) strings. The data in each string must be sorted separately. How can this be done quickly.
- May 26, 2020
Apologies. You're correct. Small adjustment needed: change
If MyCol <> 1 Thento
If MyCol > 2 ThenRegards
wumolad
May 23, 2020Iron Contributor
it might be difficult to visualize what you are trying to achieve without showing a sample data. Are you able to show a sample data after removing sensitive information?
Cheers
- Odintsov_MaksimMay 23, 2020Copper Contributor
- Jos_WoolleyMay 24, 2020Iron Contributor
Sub SortAllRows() Dim LRow As Long Dim i As Long Dim MyRow As Range Dim MyKey As Range With ThisWorkbook.Worksheets("Sheet1") LRow = .Cells(.Rows.Count, 1).End(xlUp).Row For i = 1 To LRow Set MyRow = .Range("B1:I1").Offset(i - 1, 0) Set MyKey = Application.Index(MyRow, 1) MyRow.Sort Key1:=MyKey, Order1:=xlAscending, Orientation:=xlLeftToRight Next i End With End SubRegards
- Odintsov_MaksimMay 24, 2020Copper ContributorIs this a VB code? Will it work like a macro, can I include it in an existing macro in edit mode?
Will this sort the cases in each row as I described?
- wumoladMay 24, 2020Iron Contributor
Is it possible to explain the exact procedure to perform to differentiate the unsorted cases and sorted cases?
For example, do you need to delete some rows or columns?
Also, are you sorting column or row wise? Somehow difficult to understand what your intention is.
Cheers
- Odintsov_MaksimMay 24, 2020Copper ContributorI'm sorting cases in each rows separately.
In other words, this is sorting columns, but only within each individual row.
The task to delete something is absent.