Check Sheet Logo
Check Sheet

FINDB

The FINDB function returns the starting position of a specified text string within another text string, counting from the end of the string. This function is useful when you need to search for a string from right to left. The search is case-sensitive.

Usage

Use the FINDB formula with the syntax shown below, it has 2 required parameters and 1 optional parameter:

=FINDB(search_for, text_to_search, [starting_at])
Parameters:
  1. search_for (required):
    The text you want to find within text_to_search.
  2. text_to_search (required):
    The text in which you want to search for search_for.
  3. starting_at (optional):
    Optional. The character position within text_to_search at which to start the search. If omitted, the search will begin at the end of the string.

Examples

Here are a few example use cases that explain how to use the FINDB formula in Google Sheets.

Finding the last occurrence of a character

You can use FINDB to find the position of the last occurrence of a character within a text string. For example, to find the position of the last forward slash (/) in a URL, you could use =FINDB("/", A1).

Extracting a file extension

You can use FINDB to extract the file extension from a file name. Assuming the file name is in cell A1, the formula =RIGHT(A1,LEN(A1)-FINDB(".",A1)) will return the file extension.

Searching from a specific position

You can use the starting_at parameter of FINDB to search for a string starting from a specific position within another string. For example, to find the second occurrence of a character in a text string, you could use =FINDB(search_for, text_to_search, FINDB(search_for, text_to_search) + 1).

Common Mistakes

FINDB not working? Here are some common mistakes people make when using the FINDB Google Sheets Formula:

Missing quotation marks around text parameters

One common mistake is forgetting to include quotation marks around text parameters. This will cause the function to return a #NAME? error value.

Specifying a starting position that is outside the length of the text string

Another common mistake is specifying a starting position that is outside the length of the text string. This will cause the function to return the #VALUE! error value.

The following functions are similar to FINDB or are often used with it in a formula:

  • FIND

    The FIND formula in Google Sheets searches for a specific text within another text and returns the position of the first occurrence of the text. This formula is often used to extract a substring from a larger string or to check if a certain text exists within another text.

  • LEFT

    The LEFT formula is used to extract a specific number of characters from the beginning of a text string. It is most commonly used to extract the first name or last name from a full name or to extract a date from a text string.

  • RIGHT

    The RIGHT formula in Google Sheets returns the rightmost characters from a string, based on the number of characters specified. It is commonly used to extract a certain number of characters from the end of a string. The formula takes two arguments: the string from which to extract the characters, and the number of characters to extract.

Learn More

You can learn more about the FINDB Google Sheets function on Google Support.