Google Sheets: Sort by Second or Third character

Google Sheets Sort by Second or Third character1

This article will talk about how to sort by the second or third character in a cell’s string value in google sheets. You may want to sort the values of strings by the second or last character from the cells in google sheets, how can you do this task quickly? You can use the RIGHT function to create a google sheets formula to solve this problem. The following will show the detailed step-by-step instructions .

Using the formula to rank by the second character

To sort the test string in the cell by its second character, you can use the RIGHT function and the combination of LEN function to create a new google sheets formula, you could refer to the general formula below.

=RIGHT(Cell, LEN(Cell)-1)

This formula will remove the first character of the text string in Cell, then you can use the sort feature to sort this column in google sheets, and then the original column will be sorted as well. Please do it as below.

Suppose you want to sort the A1:A4 range in column A by the second character.

1# Select cell B1 next to cell A1 that contains the data to be sorted

Google Sheets Sort by Second or Third character1

2# Enter the following formula in the formula box in cell B1, and then press Enter.

=right(a1,len(a1)-1)

Google Sheets Sort by Second or Third character1

3# Select cell B1, then drag the AutoFill handle down to cells B2:B4 to apply this formula. You will see that the first character will be removed.

Google Sheets Sort by Second or Third character1

4# Select cell B1:B4, click the “Data” menu, and then click the “Sort sheet by column B” submenu under the “Sort sheet” menu.

Google Sheets Sort by Second or Third character1

5# You would see both column A and column B are sorted by the second character.

Google Sheets Sort by Second or Third character1

6# You can now delete column B.

Google Sheets Sort by Second or Third character1

If you want to sort by the third character, then you can use the following RIGHT formula, and then follow steps 3-7 to complete the sorting task.

=RIGHT(Cell, LEN(Cell)-2)

Related Functions

  • Google Sheets RIGHT function
    The Google Sheets RIGHT function returns a substring (a specified number of the characters) from a text string, starting from the rightmost character.The syntax of the RIGHT function is as below:=RIGHT(text,[num_chars])…
  • google sheets LEN function
    The google sheetsLEN function returns the length of a text string (the number of characters in a text string).The syntax of the LEN function is as below:= LEN(text)…    

 

 

 

 

Related Posts

Cash Denomination Calculator

Every country has different cash denominations, so you may need to calculate the number of different denominations based on the total amount. If it is just a small amount of cash, then you can calculate the different cash denominations manually, ...

Cap percentage values between 0 and 100

This article will talk about how to cap the percentage values between 0% and 100% in Microsoft Excel Spreadsheet or Google Sheets. If you are a newbie on Excel or google Sheets, you may be able to do this by ...

Calculate Cap Percentages to Specific Value

This article will talk about how to limit the cap percentage of a given amount to a given value in Microsoft Excel Spreadsheet or Google Sheets. If you are a newbie on Excel or google Sheets, you may be able ...

Sort Data by Last Character in google sheets

Sort Data by Last Character in google sheets If you are an avid Google Sheets user, then you may have an urgent task to rank the text value by the last character from the cells; you can do this task ...

Rank Data with Multiple Criteria in google sheets

If you are an enthusiastic Google Sheets user, then you may have an urgent task to rank a specified datelist based on given multiple criteria; you can easily perform this task manually, which is also feasible, but it only works ...

Sidebar