  Get instant live expert help with Excel or Google Sheets “My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

#### Post your problem and you’ll get expert help in seconds.

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

# What is the Basic Text Sort Formula in Excel? Figure 1. of Basic Text Sort Formula in Excel.

In order to alphabetically sort text values in Excel, we can utilize the COUNTIF Function. This tutorial will assist all levels of Excel users in sorting text values.

Generic Formula

`=COUNTIF(range,"<="&A1)`

When the text is compared by Excel, it will automatically rank them by  deciding which of the values provided is greater.

## How to use the COUNTIF Function in Excel.

In the example illustrated below, we are going to utilize the COUNTIF Function to rank the listed countries in alphabetical order..

We can achieve this by following two simple steps.

1. We must first list the COUNTRIES in one column. We will label the next column HELPER where the COUNTIF Function will determine the number value of each country. .

We can use the HELPER column to store the sorted values according to their rank. Figure 2. of  Text Data for Sorting in Excel.

1. The COUNTIF formula syntax which we will input in cell B2 of the example illustrated above, is as follows;

`=COUNTIF(A1:A10,"<="&A2)` Figure 3. of the COUNTIF Function in Excel.

Copy the operation syntax in cell B2 down the HELPER column to achieve complete results.

## Note

In the example illustrated above;

• COUNTRIES = cell range A1:A10
• HELPER = B2:B10

The COUNTIF formula syntax works by using the greater than or equal to (>=) symbol operator together with text. Figure 4. of Final Result.

## Instant Connection to an Expert through our Excelchat Service:

Our live Excelchat Service is here for you. We have Excel Experts available 24/7 to answer any Excel questions you may have. Guaranteed connection within 30 seconds and a customized solution for you within 20 minutes

### Did this post not answer your question? Get a solution from connecting with the expert. Another blog reader asked this question today on Excelchat:
Related blogs
Solution examples I need a formula to count the number of rows that contain at least one of two possible phrases, but not give me the total number of instances that both phrases occur overall.
Solved by E. B. in 33 mins i have a table with Dates, First names , Last names and i want to count how many times a name occurs, but if a name occurs more than once on a particular date i need to only count it once. this is on excel and not google sheets
Solved by F. H. in 31 mins Need a formula that counts (1,2,3,4 ect..in cell M21) a range of cells, N4:N20, which are annual premium values. But I only want to add a sale count if the average monthly premium is above \$30 per sale. So if someone has 4 sales but they don't equal a total of \$120/mth (\$30 x 4 = \$120)... they would only get a count of 3 sales.
Solved by S. E. in 60 mins Hello, I am trying to create a total color column? Can anyone help?
Solved by I. A. in 60 mins Any rep that has orders over 500 and occurrences at zero for each month, for a 6 month period. I need a sum
Solved by C. E. in 60 mins ## Subscribe to Excelchat.co Another blog reader asked this question today on Excelchat: