I have a macro that takes a user's input, searches an SQL Database for the information and then pastes that information into a table.
I am able to sort one column alphabetically, however the adjacent columns do not get sorted as well.
Below is a snippet of the code for sorting:
Sub testSort()
'Sheets(1).Range("A2", Sheets(1).Range("A2").End(xlDown)).Select
'Sheets(1).Range("A2:" & Sheets(1).Range("A2").End(xlDown).Address).Select
Dim testrange As Range
Set testrange = Sheets(1).Range("A2", Sheets(1).Range("A2").End(xlDown))
testrange.Sort key1:=Range("A2"), _
order1:=xlAscending, _
Orientation:=xlSortColumns
End Sub
Image of the original test dataset, what happens after my macro, and what it should be:

testrange, is just a single column. this means it sorts the names in column A but does not move the Numbers in column B to the name's new position. To fix this, include column B intestrangelikeSheets(1).Range("A2", Sheets(1).Range("B2").End(xlDown))