ItalianPlatinum
Well-known Member
- Joined
- Mar 23, 2017
- Messages
- 793
- Office Version
- 365
- 2019
- Platform
- Windows
I have a line of code that I am just trying to sort column A by (sort A to Z) to remove a random blank row in my data set. So blank row just moved to the end, for example (unmodified):
but i keep getting this error? what am i doing wrong, it seems so simplistic
12345 |
2345 |
2222 |
3333 |
but i keep getting this error? what am i doing wrong, it seems so simplistic
VBA Code:
'run for items in O format to use for CU condition = XXXXX
With WsO
.Range("A:A").NumberFormat = "@"
.Range("A:A").RemoveDuplicates Columns:=1, Header:=xlNo
.Sort.SortFields.Clear
.Range("A:A").Sort Key1:=Range("A1"), Header:=xlNo
s = Join(Application.Transpose(.Range("A1", .Range("A" & rows.count).End(xlUp)).Value), ":")
.Range("FILTER").Value = s
.Range("B2").Value = .[Len(filter)]
End With