Dim NumCount As Long
NumCount = Cells(Rows.Count, "A").End(xlUp).Row
Range("A1:B" & NumCount).Sort Key1:=Range("A1")
End Sub
Mike F
"SystemHack" <SystemHack.1ud6ad_1125047139.4479@excelforum-nospam.com> wrote
in message news:SystemHack.1ud6ad_1125047139.4479@excelforum-nospam.com...
>
> Assume that I have a variable "NumCount" and I want to sort the range of
> cells from (1,B) to (2,NumCount), sort by the first column accending
> order. What kind of code could I use ?
>
>
> --
> SystemHack
> ------------------------------------------------------------------------
> SystemHack's Profile:
> http://www.excelforum.com/member.php...o&userid=26614
> View this thread: http://www.excelforum.com/showthread...hreadid=399388
>
Bookmarks