Google Sheets: How to Use IF(RIGHT) to Check Text at the End of a Cell

Use natural language to write 'if text ends with' with AI

Google Sheets: How to Use IF(RIGHT) to Check Text at the End of a Cell

The IF(RIGHT) Formula in Google Sheets

The IF(RIGHT) formula in Google Sheets is used to check if the rightmost characters of a cell match a specific value.

The syntax for the formula is:

=IF(RIGHT(cell_reference, number_of_characters) = "specific_value", value_if_true, value_if_false)

Here's how to use the formula:

  1. Select the cell where you want the result to appear.
  2. Enter the formula starting with =IF(RIGHT( followed by the cell reference containing the text you want to check.
  3. Add a comma and specify the number of characters from the right you want to check.
  4. Add another comma and enter the specific value you want to compare the rightmost characters to.
  5. Add another comma and specify the value to display if the condition is true.
  6. Add a final comma and specify the value to display if the condition is false.
  7. Press Enter to see the result.

For example, if you want to check if the last 3 characters of cell A1 are "123" and display "Match" if true and "No Match" if false, you would enter the formula as follows:

=IF(RIGHT(A1, 3) = "123", "Match", "No Match")

Now you can use simple words to process data. It's at CapGo AI Sheet. For Google Sheet formula '=IF(RIGHT(A1, 3) = "Ltd", "Company", "Other")':

You can write a simple instruction "Return 'Company' if the last three characters of #A are 'Ltd', otherwise return 'Other'"

In 1 second, all your data is processed!

Try it now at CapGo.AI

Read more