Sort data alphabetically (A-Z) in a column
How to sort data in an alphabetical order (A to Z) in a column using Excel and VBA methods
Select data > Home tab > Sort & Filter > Custom Sort > Select the Column by which to sort > Select which to Sort on > Select Order > OK
1. Select the range that captures the data you want to sort. Note: in this example we are selecting the data with the headers selected. |
2. Select the Home tab. |
3. Click on Sort & Filter in the Editing group. 4. Click on Custom Sort. |
5. Select the Column by which you want to sort by. Note: in this example we are sorting by a column that captures the product name and is titled Product List. 6. Select the Sort on type. Note: in this example we are sorting by cell values. 7. Select A to Z from the Order drop down menu. 8. Click OK. Note: by default the My data has headers checkbox should be checked, however, if it isn't you will need to check the checkbox. |
9. This image represents the result of sorting the selected data in an alphabetical order (A to Z). |
METHOD 2. Sort data alphabetically (A-Z) in a column
EXCEL
Select data > Home tab > Sort & Filter > Sort A to Z
1. Select the range that captures the data you want to sort. Note: in this example we are selecting the data with the headers selected. |
2. Select the Home tab. |
3. Click on Sort & Filter in the Editing group. 4. Click on Sort A to Z. |
5. This image represents the result of sorting the selected data in an alphabetical order (A to Z). |
Sub Sort_Alphabetically()
'declare variables
Dim ws As Worksheet
Dim Rng As Range
Dim ws As Worksheet
Dim Rng As Range
Set ws = Worksheets("Sheet1")
Set Rng = ws.Range("B3:C9")
Set Rng = ws.Range("B3:C9")
'sort data in alphabetical order (A to Z) in column B
Rng.Sort Key1:=Range("B:B"), Order1:=xlAscending
Rng.Sort Key1:=Range("B:B"), Order1:=xlAscending
End Sub
PREREQUISITES
Worksheet Name: Have a worksheet named Sheet1.
Data Range: In this example the data is captured in range ("B3:C9"). This range does not include headings.
Column Order: In this example the data is being sorted alphabetically by column B, which is represented by range reference ("B:B").
Worksheet Name: Have a worksheet named Sheet1.
Data Range: In this example the data is captured in range ("B3:C9"). This range does not include headings.
Column Order: In this example the data is being sorted alphabetically by column B, which is represented by range reference ("B:B").
ADJUSTABLE PARAMETERS
Hide Worksheet: Select the worksheet that captures the data that you want sort by changing the Sheet1 worksheet name.
Data Range: Select the data range that you want to sort by changing the range reference("B3:C9").
Column Order: Select the column which you want to sort alphabetically by ranging the range reference ("B:B") to any column that is within the specified range.
Hide Worksheet: Select the worksheet that captures the data that you want sort by changing the Sheet1 worksheet name.
Data Range: Select the data range that you want to sort by changing the range reference("B3:C9").
Column Order: Select the column which you want to sort alphabetically by ranging the range reference ("B:B") to any column that is within the specified range.
ADDITIONAL NOTES
Note 1: This VBA code assumes that the selected data range does not include headings.
Note 1: This VBA code assumes that the selected data range does not include headings.
EXPLANATION
This tutorial explains and provides step by step instructions on how to sort data in an alphabetical order (A to Z) in a column using Excel and VBA methods.
This tutorial explains and provides step by step instructions on how to sort data in an alphabetical order (A to Z) in a column using Excel and VBA methods.
Excel Methods: This tutorial provides two examples on how to sort data in an alphabetical order, in a column. The first method can be achieved in 8 steps and gives you more functionality through the Sort window. The second method can be achieved in 4 steps, however, it will only sort alphabetically based on the first selected column.
VBA Method: This tutorial provides one VBA example on how to sort data in an alphabetical order, in a column.