![]() |
|
#5
|
||||
|
||||
|
Code:
Sub blah()
With ActiveWorkbook.Worksheets("SortIt")
For colm = 1 To 340
.Cells(1, colm).Resize(16).Sort .Cells(1, colm)
Next colm
End With
End Sub
340 columns starting at column A Sort range in each column is from row 1 to 16. (If your range is from row 3 to 10 then change to: .Cells(3, colm).Resize(8).Sort .Cells(1, colm) You do NOT need to change the second 1. There are no headers in each column. An ascending sort is required. The above are the defaults - it is very easy to include/tweak these. Come back if necessary. |
| Tags |
| macro, sorting columns |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .pdf to .xlsx - How to get sort-able columns? | CCinPA | Excel | 0 | 07-05-2016 08:30 AM |
Normal sort not bringing along other columns
|
Dave Fraser | Excel | 2 | 06-06-2014 11:48 AM |
| Need help sorting data in columns that will sort by number of Xs | brenna.at.work | Excel | 8 | 04-12-2014 07:00 AM |
| quick replace, sort, change columns | userman | Excel | 1 | 05-01-2012 06:24 AM |
How to sort table having three columns?
|
Bahir Barak | Word | 2 | 01-20-2011 01:52 PM |