I have two columns, and I want to sort Column B in ascending order with vba code, but when column B is sorted, the corresponding cells in Column A should also be sorted together.
So for eg.
ColumnA | ColumnB
Apple | 5
Pear | 2
Banana | 3
After sorting it should display
ColumnA | ColumnB
Pear | 2
Banana | 3
Apple | 5
What I have is:
and it isn't working, its not even sorting column B.Please Login or Register to view this content.
Bookmarks