Is there a find formula in excel

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2019 for Mac Excel 2016 Excel 2016 for Mac Excel 2013 Excel 2010 Excel 2007 Excel for Mac 2011 Excel Starter 2010 More…Less

This article describes the formula syntax and usage of the FIND and FINDB functions in Microsoft Excel.

Description

FIND and FINDB locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.

Important: 

  • These functions may not be available in all languages.

  • FIND is intended for use with languages that use the single-byte character set (SBCS), whereas FINDB is intended for use with languages that use the double-byte character set (DBCS). The default language setting on your computer affects the return value in the following way:

  • FIND always counts each character, whether single-byte or double-byte, as 1, no matter what the default language setting is.

  • FINDB counts each double-byte character as 2 when you have enabled the editing of a language that supports DBCS and then set it as the default language. Otherwise, FINDB counts each character as 1.

The languages that support DBCS include Japanese, Chinese (Simplified), Chinese (Traditional), and Korean.

Syntax

FIND(find_text, within_text, [start_num])

FINDB(find_text, within_text, [start_num])

The FIND and FINDB function syntax has the following arguments:

  • Find_text    Required. The text you want to find.

  • Within_text    Required. The text containing the text you want to find.

  • Start_num    Optional. Specifies the character at which to start the search. The first character in within_text is character number 1. If you omit start_num, it is assumed to be 1.

Remarks

  • FIND and FINDB are case sensitive and don’t allow wildcard characters. If you don’t want to do a case sensitive search or use wildcard characters, you can use SEARCH and SEARCHB.

  • If find_text is «» (empty text), FIND matches the first character in the search string (that is, the character numbered start_num or 1).

  • Find_text cannot contain any wildcard characters.

  • If find_text does not appear in within_text, FIND and FINDB return the #VALUE! error value.

  • If start_num is not greater than zero, FIND and FINDB return the #VALUE! error value.

  • If start_num is greater than the length of within_text, FIND and FINDB return the #VALUE! error value.

  • Use start_num to skip a specified number of characters. Using FIND as an example, suppose you are working with the text string «AYF0093.YoungMensApparel». To find the number of the first «Y» in the descriptive part of the text string, set start_num equal to 8 so that the serial-number portion of the text is not searched. FIND begins with character 8, finds find_text at the next character, and returns the number 9. FIND always returns the number of characters from the start of within_text, counting the characters you skip if start_num is greater than 1.

Examples

Copy the example data in the following table, and paste it in cell A1 of a new Excel worksheet. For formulas to show results, select them, press F2, and then press Enter. If you need to, you can adjust the column widths to see all the data.

Data

Miriam McGovern

Formula

Description

Result

=FIND(«M»,A2)

Position of the first «M» in cell A2

1

=FIND(«m»,A2)

Position of the first «M» in cell A2

6

=FIND(«M»,A2,3)

Position of the first «M» in cell A2, starting with the third character

8

Example 2

Data

Ceramic Insulators #124-TD45-87

Copper Coils #12-671-6772

Variable Resistors #116010

Formula

Description (Result)

Result

=MID(A2,1,FIND(» #»,A2,1)-1)

Extracts text from position 1 to the position of «#» in cell A2 (Ceramic Insulators)

Ceramic Insulators

=MID(A3,1,FIND(» #»,A3,1)-1)

Extracts text from position 1 to the position of «#» in cell A3 (Copper Coils)

Copper Coils

=MID(A4,1,FIND(» #»,A4,1)-1)

Extracts text from position 1 to the position of «#» in cell A4 (Variable Resistors)

Variable Resistors

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

The two formulas FIND and SEARCH in Excel are very similar. They search through a cell or some text for a keyword or character. Once found, they return the number of characters, at which the keyword starts. Let’s learn how to use them and explore the differences of the two formulas.

How to use the FIND formula

The formula returns the number of the character, at which your search term starts. If your text can’t be found, it’ll return a “#VALUE” error.

Structure of the FIND formula

find, formula, excel, structure
The FIND formula has at least two arguments: The SEARCH TERM as well as the “WITHIN TEXT”. The third part is optional.

The structure of the FIND formula is quite simple (the numbers are corresponding to the image on the right-hand side):

  1. SEARCH TERM: The first part of the formula is the text you look for.
  2. WITHIN TEXT: The cell or text you want to search your “SEARCH TERM” in.
  3. START NUMBER: This argument is optional. If you don’t want to start searching at the beginning of the text, fill in the number larger than 1, otherwise just type 1 or leave it blank.

If you just want to know, if your text can be found within another cell, you might want to go with the following formula. B2 contains the text or character you search for and B3 is the cell you search in:

=IFERROR(IF(FIND(B2,B3)>0,”Value found”,””),”Value not found”)

Please note the following comments:

  • FIND is case-sensitive. That means, it matters if you use small or capital letters.
  • You can also search for numbers within another number. For example: =FIND(1,321)This formula returns 3 because the number 1 is the third character of 321.
  • You can’t use wildcard criteria (“*” or “?”) with the FIND formula.
  • Please refer to this article if you want to know more about the IF formula and to this article for more information about the IFERROR formula.

Examples for the FIND formula

Let’s try some examples.

Example 1: Find the first occurrence

example, find, excel
Example 1: Find “o” in “Hello there”.

The “default” usage of the FIND formula is to return the number of characters, at which a text first occurs within another text. Let’s say you have the text “Hello there” and want to know, at which position you have an “o”. In such case, you write the following formula (example number 1 in the Excel workbook you can download at the end of this article).

=FIND(“o”,”Hello there”)

The return value is 5.

Example 2: Find the first occurrence after the third character

find, example, excel
Example 2: Get the position of the first “e” after the third character.

Another example: You want to know the position of “e” after the third character (example number 2 in the example workbook).

=FIND(“e”,”Hello there”,3)

The return value is 9.

Example 3: Find the second occurrence

find, example, second
Example 3: Get the position of the second “e” in “Hello there”.

Now you want to know the position of the second occurrence of “e” in “Hello there”.

=FIND(“e”;”Hello there”;FIND(“e”;”Hello there”)+1)

This formula works as follows. The second FIND formula returns the position of the first occurrence of “e” in “Hello there” which is 2. This is used as the START NUMBER (+ 1 because you want to start counting after the first “e”) for the first FIND formula.

Example 4: Find the last occurrence

example, find, position, last character
Example 4: Get the position of the last occurrence of “e” in “Hello there”

Finding the last occurrence of a string within a text is a little bit more complicated. You use SUBSTITUTE and LEN. The complete formula is like this:

=FIND(“tempreplacetext”;SUBSTITUTE(“Hello there”;”e”;”tempreplacetext”;SUM(LEN(“Hello there”)-LEN(SUBSTITUTE(“Hello there”;”e”;””)))/LEN(“e”)))

In order to understand the formula better, let’s start in the middle with the part SUM(LEN(“Hello there”)-LEN(SUBSTITUTE(“Hello there”;”e”;””)))/LEN(“e”)))

This part of the formula determines the number of “e” in “Hello there”. It replaces “e” in “Hello there” and the difference in the two versions (with and without e – “Hello there” and “Hllo thr”) is the number of “e”s.

The whole part SUBSTITUTE(“Hello there”;”e”;”tempreplacetext”;SUM(LEN(“Hello there”)-LEN(SUBSTITUTE(“Hello there”;”e”;””)))/LEN(“e”))) replaces the last “e” by “tempreplacetext”. Now you just put this into the FIND formula and get the position of “tempreplacetext”.

If you want to use this formula, replace all “e”s by your cell reference for the SEARCH TEXT and all “Hello there” by the cell reference to your WITHIN TEXT.

Replace text enclosed by brackets

example, return, find, mid, excel
Example 5: Return the text between the brackets of “Hello (you) there”.

A last example for the FIND formula: You want to know what is written between two brackets. In such case, you can also use the FIND formulas in combination with the MID formula.

=MID(“Hello (you) there”,FIND(“(“,”Hello (you) there”)+1,FIND(“)”,”Hello (you) there”)-FIND(“(“,”Hello (you) there”)-1)

The MID formula returns some part of text from a (longer) text. It has three arguments:

  1. The initial, complete text.
  2. The starting character for the text you want to get.
  3. The length (in number of characters) of text you want to extract.

In our example above, the first FIND formula provides the character you want to start at. In our case that’s the first opening bracket (+1 because you want to start one character later). The second and third FIND formulas determine the length by

How to use the SEARCH formula

Like the FIND formula in Excel, SEARCH also returns the position of a text within another text.

Structure of the SEARCH formula

search, find, formula, arguments, structure
The SEARCH formula has the same arguments as the FIND formula.

The SEARCH formula is very similar to the FIND formula. It has exactly the same arguments and works the same way.

Because of the, the structure is as follows:

  1. The SEARCH TERM is the text or character you search for.
  2. WITHIN TEXT contains the text you search in.
  3. The START NUMBER is optional and defines the number of character, after which Excel should start searching.

Yes, you are right – these arguments are exactly the same like in the FIND formula. But there is a major difference: SEARCH does not regard lower and upper case: It is not case sensitive. FIND on the other hand is case-sensitive and regards upper and lower cases.


Do you want to boost your productivity in Excel?

Get the Professor Excel ribbon!

Add more than 120 great features to Excel!


Examples for the SEARCH formula

The examples work exactly the same way like for the FIND formula. You only have to replace “FIND” by “SEARCH”. Because of that, we just show the summary below. If you want to know more, either scroll up to the “FIND”-examples or download the example workbook below.

Example no.  Description Formula
6 Return the position of “o” in “Hello there”. =SEARCH(“o”,”Hello there”)
7 Return the position of “e” in “Hello there” after the third character. =SEARCH(“e”,”Hello there”,3)
8 Return the position of the second occurrence of “e” in “Hello there”. =SEARCH(“e”,”Hello there”,SEARCH(“e”,”Hello there”)+1)
9 Return the position of the last occurrence of “e” in “Hello there”. =SEARCH(“tempreplacetext”,SUBSTITUTE(“Hello there”,”e”,”tempreplacetext”,SUM(LEN(“Hello there”)-LEN(SUBSTITUTE(“Hello there”,”e”,””)))/LEN(“e”)))
10 Return the text within brackets of “Hello (you) there”. =MID(“Hello (you) there”,SEARCH(“(“,”Hello (you) there”)+1,SEARCH(“)”,”Hello (you) there”)-SEARCH(“(“,”Hello (you) there”)-1)

Troubleshooting

The error message “#VALUE!” comes up most often for the FIND and SEARCH formulas. If you receive a “#VALUE!” error, please check the following possibilities.

  • Make sure your SEARCH TERM can be found. If it can’t be found, you’ll receive the #VALUE! error.
  • The last argument, the START NUMBER, is larger than the number of characters of in your WITHIN TEXT argument.
  • You haven’t provided the last argument although you wrote the comma. For instance =SEARCH(“b”,”abc”,).
  • Please check, if your SEARCH TERM and WITHIN TEXT have the same format. You can’t search for a letter or text in a number cell.

Difference between FIND and SEARCH

The first and major difference between FIND and SEARCH:

FIND is case-sensitive. SEARCH is not case-sensitive.

That means, FIND regards capital and small letter whereas SEARCH doesn’t.

How to remember which is which? I use the mnemonic:

  • FIND finds exactly what you look for.
  • Searching for something also searches for roughly what you look for.

I admit, it’s not the best mnemonic. Please let me know, if you have a better one!

There is also a second difference between FIND and SEARCH: You can use SEARCH with wildcard criteria within the SEARCH TERM.

  • “?” stands for a single character. Example: =SEARCH(“?b”,”abc”)
  • “*” matches any sequence of characters. =SEARCH(“*b”,”abc”)
  • If you want to search exactly for ? or *, write a tilde in front of them. Example: =SEARCH(“~*”,”ab*c”)

Differences between FIND and FINDB as well as SEARCH and SEARCHB

Maybe you have noticed that there is also a slightly different version of the two formulas in Excel. If you add a “B” to the formulas, you can still use them the same way. So what is the difference?

FINDB and SEARCHB provide support for more complex languages. The definition by Microsoft is:

SEARCHB counts 2 bytes per character only when a DBCS language is set as the default language. Otherwise SEARCHB behaves the same as SEARCH, counting 1 byte per character.

According to Wikipedia DBCS stands mainly for the Asian languages Chinese, Japanese and Korean.

Please feel free to download all the examples shown above in this Excel file.

Click here and the download starts immediately.

Purpose 

Get location substring in a string

Return value 

A number representing the location of substring

Usage notes 

The FIND function returns the position (as a number) of one text string inside another. If there is more than one occurrence of the search string, FIND returns the position of the first occurrence. When the text is not found, FIND returns a #VALUE error. Also note, when find_text is empty, FIND returns 1. FIND does not support wildcards, and is always case-sensitive. Use the SEARCH function to find the position of text without case-sensitivity and with wildcard support. 

Basic Example

The FIND function is designed to look inside a text string for a specific substring. When FIND locates the substring, it returns a position of the substring in the text as a number. If the substring is not found, FIND returns a #VALUE error. For example:

=FIND("p","apple") // returns 2
=FIND("z","apple") // returns #VALUE!

Note that text values entered directly into FIND must be enclosed in double-quotes («»).

Case-sensitive

The FIND function always case-sensitive:

=FIND("a","Apple") // returns #VALUE!
=FIND("A","Apple") // returns 1

TRUE or FALSE result

To force a TRUE or FALSE result, nest the FIND function inside the ISNUMBER function. ISNUMBER returns TRUE for numeric values and FALSE for anything else. If FIND locates the substring, it returns the position as a number, and ISNUMBER returns TRUE:

=ISNUMBER(FIND("p","apple")) // returns TRUE
=ISNUMBER(FIND("z","apple")) // returns FALSE

If FIND doesn’t locate the substring, it returns an error, and ISNUMBER returns FALSE. 

Start number

The FIND function has an optional argument called start_num, that controls where FIND should begin looking for a substring. To find the first match of «the» in any combination of upper or lowercase, you can omit start_num, which defaults to 1:

=FIND("x","20 x 30 x 50") // returns 4

To start searching at character 5, enter 4 for start_num:

=FIND("x","20 x 30 x 50",5) // returns 9

Wildcards

The FIND function does not support wildcards. See the SEARCH function.

If cell contains

To return a custom result with the SEARCH function, use the IF function like this:

=IF(ISNUMBER(FIND(substring,A1)), "Yes", "No")

Instead of returning TRUE or FALSE, the formula above will return «Yes» if substring is found and «No» if not.

Notes

  • The FIND function returns the location of the first find_text in within_text.
  • The location is returned as the number of characters from the start.
  • Start_num is optional and defaults to 1.
  • FIND returns 1 when find_text is empty.
  • FIND returns #VALUE if find_text is not found.
  • FIND is case-sensitive but does not support wildcards.
  • Use the SEARCH function to find a substring with wildcards.

Find in excel

Find in Excel (Table of Contents)

  • Using Find and Select Feature in Excel
  • FIND Function in Excel
  • SEARCH Function in Excel

Introduction to Find in Excel

There are two ways to find it in Excel. First, we can use Find by pressing Ctrl + F shortcut keys. Therein Find and Replace box, search the word or field which we want to find in the Find What section. In another way, we can use the FIND function. For this, select the Find function from the insert function and, as per syntax, select the substring from where we need to find it, and choose the word or letter or number which we want to find in the String position. This will return the position of the chosen string from the selected Substring.

Methods to Find in Excel

Below are the different methods to find in excel.

You can download this Find in Excel Template here – Find in Excel Template

Method #1 – Using Find and Select Feature in Excel

Let’s see How to Find a Number or a Character in Excel using the Find and Select feature in Excel.

Step 1 – Under the Home tab, in the Editing group, click Find & Select.

find in excel method 1-1

Step 2 – To find text or numbers, click Find.

find in excel method 1-2

  • In the Find what box, type the text or character you want to search for, or click the arrow in the Find what box and then click a recent search in the list.

find in excel method 1-3

Here, we have a record of marks of four students. Suppose we want to find the text ‘envy’ in this table. For this, we click Find and Select under the Home tab then the Find and Replace dialog box appears. In the Find what box, we enter ‘envy’ then click on Find All. We get the text ‘envy’ is in cell number A5.

find in excel method 1-4

  • You can use wildcard characters, such as an asterisk (*) or a question mark (?), in your search criteria:

Use the asterisk to find any string of characters.

Suppose we want to find text in the table which starts with the letter ‘j’ and ends with the letter ‘n’. In the Find and Replace dialog box, we enter ‘j*n’ in the Find what box, then click on Find All.

find in excel method 1-5

We will get the result as text ‘j*n’(john) is in the cell no. ‘A2’ because we have only one text which starts with ‘j’ and ends with ‘n’ with any number of characters between them.

find in excel method 1-6

Use the question mark to find any single character.

Suppose we want to find text in the table that starts with the letter ‘k’ and ends with the letter ‘n’ with a single character. So, in the Find and Replace dialog box, we enter ‘k?n’ to find what box. Then click on Find All.

Find and Replace

Here, we get the text ‘k?n’(kin) is in cell no. ‘A4’ because we have only one text which starts with ‘k’ and ends with ‘n’ with a single character between them.

find in excel method 1-8 

  • Click Options to further define your search if needed.
  • We can find text or number by changing settings in the Within, Search and Look in the box according to our needs.
  • To show the working of the above-mentioned options, we took the data as follows.

find in excel method 1-9

  • To search case-sensitive data, select the Match case check box. It gives you output in the case you give input in the Find What box. For example, we have a table of some cars’ names. If you type ‘ferrari’ in the Find What box, then it will find only ‘ferrari’, not ‘Ferrari’.

find in excel method 1-10

  • To search for cells that contain just the characters you typed in the Find what box, select the Match entire cell contents checkbox. For example, we have a table of some cars’ names. Type ‘Creta’ in the Find What box.

Match entire cell contents 1-11

  • It will then find cells containing exactly ‘Creta’, and cells containing ‘Cretaa’ or ‘Creta car’ will not be found.

find in excel method 1-12

  • If you want to search for text or numbers with specific formatting, click Format, and then make your selections in the Find Format dialog box according to your need.
  • Let us click the Font option and select the Bold, and click OK.

Click the Font option 1-13

  • Then, we click on Find All.

 find in excel method 1-14

We get the value as ‘elisa’, which is in the ‘A3’ cell.

find in excel method 1-15

Method #2 – Using FIND Function in Excel

The FIND function in Excel gives the location of a substring within a string.

Syntax For FIND in Excel:

Find Formula

The first two parameters are required, and the last parameter is non-compulsory.

  • Find_Value: The substring which you want to find.
  • Within_String: The string in which you want to find the specific substring.
  • Start_Position: It is a non-compulsory parameter and describes from which position we want to search substring. If you do not describe it, then start the search from the 1st position.

For example =FIND(“o”, “Cow”) gives 2 because “o” is the 2nd letter in the word “cow“.

find in excel method 2-1

FIND(“j”, “Cow”) gives an error because there is no “j” in “Cow”.

Value Error 2-2

  • If the Find_Value parameter contains multiple characters, the FIND function gives the location of the first character.

E.g., the formula FIND(“ur”, “hurry”) gives 2 because “u” in the 2nd letter in the word “hurry”.

find in excel method 2-3

  • If Within_String contains multiple occurrences of Find_Value, the first occurrence is returned. For example, FIND (“o”, “wood”)

find in excel method 2-4

gives 2, which is the location of the first “o” character in the string “wood”.

The Excel FIND function gives the #VALUE! error if:

  1.  If Find_Value does not exist in Within_String.
  2.  If Start_Position contains multiple characters as compared to Within_String.
  3.  If Start_Position either has a zero or negative number.

Method #3 – Using SEARCH Function in Excel

The SEARCH function in Excel is simultaneous to FIND because it also gives the location of a substring in a string.

SEARCH Formula

  • If Find_Value is the blank string “, the Excel FIND formula gives the string’s first character.

SEARCH Function method 3-1

Example =SEARCH (“ful“, “Beautiful) gives 7 because the substring “ful” begins at the 7th position of the substring “beautiful”.

SEARCH Function method 3-2

=SEARCH (“e”, “MSExcel”) gives 3 because “e” is the 3rd character in the word “MSExcel” and ignoring the case.

SEARCH Function method 3-3

  • Excel’s SEARCH function gives the #VALUE! error if:
  1. If the value of the Find_Value parameter is not found.
  2. If the Start_Position parameter is superior to the length of Within_String.
  3. If the Start_Position either equal to or less than 0.

Things to Remember About Find in Excel

  • Asterisk defines a string of characters, and the question mark defines a single character. You can also find asterisks, question marks, and tilde characters (~) in worksheet data by preceding them with a tilde character inside the Find what option.

For example, to find data that contain “*”, you would type ~* as your search criteria.

  • If you want to find cells that match a specific format, you can delete any criteria in the Find what box and select a specific cell format as an example. Click the arrow next to Format, click Choose Format From Cell, and click the cell with the formatting you want to search for.
  • MSExcel saves the formatting options you define; you should clear the formatting options from the last search by clicking on an arrow next to Format and then Clear Find Format.
  • The FIND function is case sensitive and does not allow while using wildcard characters.
  • The SEARCH function is case-insensitive and allows while using wildcard characters.

Recommended Articles

This is a guide to Find in Excel. Here we discuss how to use the Find feature, Formula for FIND, and SEARCH in Excel, along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. FIND Function in Excel
  2. Excel SEARCH Function
  3. Find and Replace in Excel
  4. Search For Text in Excel

What does it do?

Gets the position of a specific text within another text

Formula breakdown:

=FIND(find_text, within_text, [start_num])

What it means:

=FIND(text to be searched, the source text, [starting position of the source text])


If you want to check where a specific text is located in the source text, it is very easy to search for the position using the FIND Formula!

You need to take note that the FIND Formula is case-sensitive when searching for your text! And it always matches the first occurrence. We will see in our examples below!

I explain how you can do this below:

STEP 1: We need to enter the FIND function in a blank cell:

=FIND(

FIND Formula in Excel

STEP 2: The FIND arguments:

find_text

What is the text to be searched for?

Select the cell containing the text to be searched for. In our first example, we want to search for ‘x’ in the word ‘Excel’:

=FIND(D9,

FIND Formula in Excel

within_text

What is your source text?

Select the cell source text. So let’s select ‘Excel’ as our source text:

=FIND(D9, C9,

FIND Formula in Excel

start_num

Where do you want to start searching in your source text?

You can leave this blank, it will default to 1 which means it will start looking from the first character of your source text. In our case, let us put in 1 to start searching from there:

=FIND(D9, C9, 1)

FIND Formula in Excel

Apply the same formula to the rest of the cells by dragging the lower right corner downwards.

FIND Formula in Excel

You can see that the matching is case sensitive! And if it’s unable to find your text, it will return #VALUE.

FIND Formula in Excel

How to Use the FIND Formula in Excel

FIND Formula in Excel | MyExcelOnline

About The Author

Bryan

Bryan

Bryan is a best-selling book author of the 101 Excel Series paperback books.

Понравилась статья? Поделить с друзьями:
  • Is there a draw tool in word
  • Is there a comma before the word which
  • Is there a comma after the word and
  • Is there a better word than beautiful
  • Is then a time order word