This article provides a detailed guide on how to sort a database in Excel.

Sorting data is an essential task when working in Excel.
1. Simple Data Sorting:
Step 1: Select the data range to be sorted -> Data -> Sort:

Step 2: The Sort dialog appears. Choose the data field to sort by in the Sort by -> select the sorting type in the Order section. For example, here we are sorting revenue from low to high:

After clicking OK, you'll get the result:

2. Sort Names in Alphabetical Order.
Step 1: Insert three new columns for last name, middle name, and first name as shown in the image:

Step 2: Copy the entire Name column to the Name -> press Ctrl + H -> the dialog appears in the section:
- Find What: Enter an asterisk and space.
- Leave the Replace with field blank.
- Finally, click Replace All:

Step 3: After clicking Replace All, you'll get the result:

Step 4: In cell C9 in the Last Name column, enter the formula as shown in the image:

Step 5: Press Enter and copy the formula for the remaining values in the column to achieve the result:

Step 6: Copy the entire Last Name column and paste using Paste Value -> Copy the Last Name column again -> paste it to the Middle Name column -> press Ctrl + H -> the dialog appears in the section:
- Find what: Enter an asterisk and a space.
- Replace with: Leave it blank.
- Finally, click Replace All:

Step 7: Copy and Paste the Middle Name column using Paste Value. In cell C9 of the Last Name column, enter the formula as shown in the image:

Step 8: After pressing Enter, copy the formula for the remaining values in the column to achieve the result:

Step 9: Perform Copy and Paste for the Last Name column using Paste Value to get the result:

Step 10: Select the entire data table in Data -> Sort -> the dialog appears, enter the values as shown in the image (to add a sorting level, click Add Level):

Step 11: After clicking OK, the entire data in the table is sorted:

- In case you want to merge the three columns Last Name, Middle Name, First Name into the Last Name and First Name column, concatenate the three strings by adding a space:

- Press Enter -> copy the formula for the remaining values in the column -> perform Copy for the Last Name and First Name column and Paste using Paste Value -> delete the three columns Last Name, Middle Name, First Name to get the result:

Here is a detailed guide on how to sort a database in Excel 2013.
Wishing you all success!
