# Basic VBA help for a simple sort



## ItalianPlatinum (Dec 16, 2022)

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):

12345234522223333

but i keep getting this error? what am i doing wrong, it seems so simplistic






```
'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
```


----------



## DanteAmor (Dec 16, 2022)

ItalianPlatinum said:


> but i keep getting this error? what am i doing wrong, it seems so simplistic


That's how it is. You are missing a dot on this line, before Range("A1")

```
.Range("A:A").Sort Key1:=*.*Range("A1"), Header:=xlNo
```


----------

