If you want to find the position of a string within a text, the FIND function in Google Sheets will come in handy.
This useful text function allows you to search text for a string to return its position.
In this tutorial, I will show you how to use the FIND function in Google Sheets.
Table of Contents
What is the FIND Function?
The FIND function will return the position that a string is found at within a searched text. This function is case-sensitive.
So in other words, the FIND function will search a text for your specified string, and return the position at which the string is located.
The syntax of the FIND function is:
=FIND(search_for, text_to_search, [starting_at])
- search_for – this is the string to look for within your text_to_search
- text_to_search – the text to be searched for the first occurrence of search_for
- starting_at – this argument is optional and is set to 1 by default. Here you can specify which character within text_to_search to begin your search at
There are some important things to know about how the FIND function works
- FIND is case-sensitive. If your search_for text is capitalized differently than your text_to_search the function won’t work properly
- If your search_for string is not found within the text_to_search the formula will result in an #VALUE! error.
Using the FIND Function
Let’s take a look at an example to see how the FIND function can be used in a spreadsheet
You can see in the example above that the formula simply returns the position of the string with the text_to_search argument. The last formula in the example results in #VALUE! because FIND is case sensitive so that string does not actually exist with the searched text.
Here is a step by step guide on how to set up this formula in your own spreadsheet:
1. Select the select where you want the FIND formula to calculate and enter the equals sign (=) and type FIND on your keyboard. Press tab when you are done to start entering into the formula
2. The first argument that you need to enter is search_for. Select the cell that contains the string you want to search for or type the string into the formula itself. Add a comma when you are done with this step
3. Next we need to enter the text_to_search argument of this function. Select the cell that contains the text you want to search in or type the text into the formula itself. Add a closing parenthesis when you are done with this step “)”
4. Press enter on your Enter keyboard and your formula will calculate. If you have additional lines to perform the function on you can copy and paste the formula down
The FIND function is a very useful text function for searching through text and returning the position of a string. The key thing to know with FIND is that it is case-sensitive.
There is another similar function called the SEARCH function that is not case-sensitive, so if you’re looking for something that ignores case you will want to use SEARCH instead of FIND.
I will not cover SEARCH in this article, however the syntax is the exact same as FIND, so if you have went through this post, you know have learned both functions.
More Google Sheets Tutorials:
How to Extract Numbers or Text from a String
Check if Value is in Range