I think I'm doing something dumb since the solutions I've researched online don't work but I'm trying to sort a dynamic range of cells by their first column.
I have 4484 rows of data, column A is a text index. AB000100 - AB0014493, no cell in the col A range is empty. There are no duplicates. In the other cells the empty cells are represented by -
All cells are General Category.
When I run the macro it does not sort and spits a run-time error '1004' Sort method of Range class failed.
The data can be sorted manually, but what fun is that? I've never used Range.sort before so I think/hope it's something easy I'm forgetting...
Thank you!!!
Code:
Dim LastRow As Integer
Dim LIB As String
LIB = "Library"
Sheets(LIB).Range("A65536").End(xlUp).Select
LastRow = ActiveCell.Row 'Determine last row
Sheets(LIB).Range("A9:R" & LastRow).Sort key1:=Range("A9:A" & LastRow), _
order1:=xlAcending, Header:=xlNo
I have 4484 rows of data, column A is a text index. AB000100 - AB0014493, no cell in the col A range is empty. There are no duplicates. In the other cells the empty cells are represented by -
All cells are General Category.
When I run the macro it does not sort and spits a run-time error '1004' Sort method of Range class failed.
The data can be sorted manually, but what fun is that? I've never used Range.sort before so I think/hope it's something easy I'm forgetting...
Thank you!!!