im trying to sort using vba, i have the code to select the cell i want to start with.
i want to use xlDown and xlToRight to select my range.
heres my code, how can i make it work?
![]()
With ActiveWorkbook.Worksheets("Berger").Sort .SetRange Range(ActiveCell, Cells(ActiveCell.End(xlDown).Row, ActiveCell.End(xlToRight).Column)).Select .Header = xlGuess .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With
Bookmarks