*The tutorial explains the syntax of the Excel FIND and SEARCH functions and provides formula examples of advanced non-trivial uses.*

In the last article, we covered the basics of the Excel Find and Replace dialog. In many situations, however, you may want Excel to find and extract data from other cells automatically based on your criteria. So, let's have a closer look at what the Excel search functions have to offer.

The FIND function in Excel is used to return the position of a specific character or substring within a text string.

The syntax of the Excel Find function is as follows:

FIND( find_text, within_text, [start_num] )

The first 2 arguments are required, the last one is optional.

**Find_text**- the character or substring you want to find.**Within_text**- the text string to be searched within. Usually it's supplied as a cell reference, but you can also type the string directly in the formula.**Start_num**- an optional argument that specifies from which character the search shall begin. If omitted, the search starts from the 1^{st}character of the within_text string.

If the FIND function does not find the find_text character(s), a #VALUE! error is returned.

For example, the formula `=FIND("d", "find")`

returns 4 because "d" is the 4^{th} letter in the word "*find*". The formula `=FIND("a", "find")`

returns an error because there is no "a" in "*find*".

To correctly use a FIND formula in Excel, keep in mind the following simple facts:

- The FIND function is
**case sensitive**. If you are looking for a case-insensitive match, use the SEARCH function. - The FIND function in Excel does not allow using
**wildcard characters**. - If the find_text argument contains several characters, the FIND function returns the position of the
**first character**. For example, the formula FIND("ap","happy") returns 2 because "a" in the 2^{nd}letter in the word "happy". - If within_text contains
**several occurrences**of find_text, the first occurrence is returned. For example, FIND("l", "hello") returns 3, which is the position of the first "l" character in the word "hello". - If find_text is an
**empty string**"", the Excel FIND formula returns the first character in the search string. - The Excel FIND function returns the
**#VALUE! error**if any of the following occurs:- Find_text does not exist in within_text.
- Start_num contains more characters than within_text.
- Start_num is 0 (zero) or a negative number.

The SEARCH function in Excel is very similar to FIND in that it also returns the location of a substring in a text string. Is syntax and arguments are akin to those of FIND:

SEARCH( find_text, within_text, [start_num] )

Unlike FIND, the SEARCH function is **case-insensitive** and it allows using the **wildcard characters**, as demonstrated in the following example.

And here's a couple of basic Excel SEARCH formulas:

`=SEARCH("market", "supermarket")`

returns 6 because the substring "market" begins at the 6^{th} character of the word "supermarket".

`=SEARCH("e", "Excel")`

returns 1 because "e" is the first character in the word "Excel", ignoring the case.

Like FIND, Excel's SEARCH function returns the #VALUE! error if:

- The value of the find_text argument is not found.
- The start_num argument is greater than the length of within_text.
- Start_num is equal to or less than zero.

Further on in this tutorial, you will find a few more meaningful formula examples that demonstrate how to use SEARCH function in Excel worksheets.

As already mentioned, the FIND and SEARCH functions in Excel are very much alike in terms of syntax and uses. However, they do have a couple of differences.

The most essential difference between the Excel SEARCH and FIND functions is that SEARCH is case-insensitive, while FIND is case-sensitive.

For example, SEARCH("e", "Excel") returns 1 because it ignores the case of "E", while FIND("e", "Excel") returns 4 because it minds the case.

Unlike FIND, the Excel SEARCH function allows using wildcards in the find_text argument:

- A question mark (?) matches one character, and
- An asterisk (*) matches any series of characters.

To see how it works on real data, consider the following example:

As you see in the screenshot above, the formula SEARCH("function*2013", A2) returns the position of the first character ("f") in the substring if the text string referred to in the within_text argument contains both "function" and "2013", no matter how many other characters there are in between.

In practice, the Excel FIND and SEARCH functions are rarely used on their own. Typically, you would utilize them in combination with other functions such as MID, LEFT or RIGHT, and the following formula examples demonstrate some real-life uses.

This example shows how you can find and extract all characters in a text string to the left or to the right of a specific character. To make things easier to understand, consider the following example.

Supposing you have a column of names (column A) and you want to pull the First name and Last name into separate columns.

To get the first name, you can use FIND (or SEARCH) in conjunction with the LEFT function:

`=LEFT(A2, FIND(" ", A2)-1)`

or

`=LEFT(A2, SEARCH(" ", A2)-1)`

As you probably know, the Excel LEFT function returns the specified number of left-most characters in a string. And you use the FIND function to determine the position of a space (" ") to let the LEFT function know how many characters to extract. At that, you subtract 1 from the space's position because you don't want the returned value to include the space.

To extract the last name, use the combination of the RIGHT, FIND / SEARCH and LEN functions. The LEN function is needed to get the total number of characters in the string, from which you subtract the position of the space:

`=RIGHT(A2,LEN(A2)-FIND(" ",A2))`

or

`=RIGHT(A2,LEN(A2)-SEARCH(" ",A2))`

The following screenshot demonstrates the result:

For more complex scenarios, such as extracting a middle name or splitting names with suffixes, please see How to split cells in Excel using formulas.

Supposing you have some text strings in column A, say a list of SKUs, and you want to find the position of the second dash (-) in a string. The following formula works a treat:

`=FIND("-", A2, FIND("-",A2)+1)`

The first two arguments are easy to interpret: locate a dash ("-") in cell A2. In the third argument (start_num), you embed another FIND function that tells Excel to start searching beginning with the character that comes right after the **1 ^{st} occurrence** of dash (FIND("-",A2)+1).

To return the position of the **3 ^{rd} occurrence**, you embed the above formula in the start_num argument of another FIND function and add 2 to the returned value:

`=FIND("-",A2, FIND("-", A2, FIND("-",A2)+1) +2)`

Another and probably a simpler way of finding the Nth occurrence of a given character is using the Excel FIND function in combination with CHAR and SUBSTITUTE:

`=FIND(CHAR(1),SUBSTITUTE(A2,"-",CHAR(1),3))`

Where "-" is the character in question and "3" is the Nth occurrence you want to find.

In the above formula, the SUBSTITUTE function replaces the 3rd occurrence of dash ("-") with CHAR(1), which is the unprintable "Start of Heading" character in the ASCII system. Instead of CHAR(1) you can use any other unprintable character from 1 to 31. And then, the FIND function returns the position of that character in the text string. So, the general formula is as follows:

FIND(CHAR(1),SUBSTITUTE(*cell*,*character*,CHAR(1),*Nth occurrence*))

At first sight, it may seem that the above formulas have little practical value, but the next example will show how useful they are in solving real tasks.

To locate a substring of a given length within any text string, use Excel FIND or Excel SEARCH in combination with the MID function. The following example demonstrates how you can use such formulas in practice.

In our list of SKUs, supposing you want to find the first 3 characters following the first dash and pull them in another column.

If the group of characters preceding the first dash always contains the same number of items (e.g. 2 chars) this would be a trivial task. You could use the MID function to return 3 characters from a string, starting at position 4 (skipping the first 2 characters and a dash):

`=MID(A2, 4, 3)`

Translated into English, the formula says: "Look in cell A2, begin extracting from character 4, and return 3 characters".

However, in real-life worksheets, the substring you need to extract could start anywhere within the text string. In our example, you may not know how many characters precede the first dash. To cope with this challenge, use the FIND function to determine the starting point of the substring that you want to retrieve.

The FIND formula to return the position of the 1^{st} dash is as follows:

`=FIND("-",A2)`

Because you want to start with the character that follows the dash, add 1 to the returned value and embed the above function in the second argument (start_num) of the MID function:

`=MID(A2, FIND("-",A2)+1, 3)`

In this scenario, the Excel SEARCH function works equally well:

`=MID(A2, SEARCH("-",A2)+1, 3)`

It's great, but what if the group of chars following the first dash contains a different number of characters? Hmm... this might be a problem:

As you see in the above screenshot, the formula works perfectly for rows 1 and 2. In rows 4 and 5, the second group contains 4 characters, but only the first 3 chars are returned. In rows 6 and 7, there are only 2 characters in the second group, and therefore our Excel Search formula returns a dash following them.

If you wanted to return **all chars between the 1 ^{st} and 2^{nd} occurrences** of a certain character (dash in this example), how would you proceed? Here is the answer:

`=MID(A2, FIND("-",A2)+1, FIND("-", A2, FIND("-",A2)+1) - FIND("-",A2)-1)`

For better understanding of this MID formula, let's examine its arguments one by one:

- 1
^{st}argument (text). It's the text string containing the characters you want to extract, cell A2 in this example. - 2
^{nd}argument (start_position). Specifies the position of the first character you want to extract. You use the FIND function to locate the first dash in the string and add 1 to that value because you want to start with the character that follows the dash: FIND("-",A2)+1. - 3
^{rd}argument (num_chars). Specifies the number of characters you want to return. In our formula, this is the trickiest part. You use two FIND (or SEARCH) functions, one determines the position of the first dash: FIND("-",A2). And the other returns the position of the second dash: FIND("-", A2, FIND("-",A2)+1). Then you subtract the former from the latter, and then subtract 1 because you don't want to include either dash. As the result, you will get the number of characters between the 1^{st}and 2^{nd}dashes, which is exactly what we are looking for. So, you feed that value to the num_chars argument of the MID function.

In a similar fashion, you can return 3 characters after the 2^{nd} dash:

`=MID(A2, FIND("-",A2, FIND("-", A2, FIND("-",A2)+1) +2), 3)`

Or, extract all the characters between the 2^{nd} and 3^{rd} dashes:

`=MID(A2, FIND("-", A2, FIND("-",A2)+1)+1, FIND("-",A2, FIND("-", A2, FIND("-",A2)+1) +2) - FIND("-", A2, FIND("-",A2)+1)-1)`

Supposing you have some long text string in column A and you want to find and extract only the text enclosed in (parentheses).

To do this, you would need the MID function to return the desired number of characters from a string, and either Excel FIND or SEARCH function to determine where to start and how many characters to extract.

`=MID(A2,SEARCH("(",A2)+1, SEARCH(")",A2)-SEARCH("(",A2)-1)`

The logic of this formula is similar to the ones we discussed in the previous example. And again, the most complex part is the last argument that tells the formula how many characters to return. That pretty long expression in the num_chars argument does the following:

- First, you find the position of the closing parenthesis:
`SEARCH(")",A2)`

- After that you locate the position of the opening parenthesis:
`SEARCH("(",A2)`

- And then, you calculate the difference between the positions of the closing and opening parentheses and subtract 1 from that number, because you don't want either parenthesis in the result:
`SEARCH(")",A2)-SEARCH("(",A2))-1`

Naturally, nothing prevents you from using the Excel FIND function instead of SEARCH, because case-sensitivity or case-insensitivity makes no difference in this example.

Hopefully, this tutorial has shed some light on how to use Search and Find functions in Excel. In the next tutorial, we are going to closely examine the Replace functions, so please stay tuned. And in the meanwhile, you may want to download the Sample FIND and SEARCH worksheet to reverse engineer the formulas for better understanding. Thank you for reading!

Excel formulas
Excel functions
Vlookup in Excel
Merge data in Excel
SumIf
Excel CountIf
Excel Compare
Excel If statement
Excel Charts
Pivot Table
Updates
Excel conditional formatting
Excel formatting
Excel time
Excel duplicates
Excel date
Excel tips
Excel macro
Outlook
Google Sheets
Outlook duplicates
Outlook templates

## 133 Responses to "Excel FIND and SEARCH functions with formula examples"

Awesome uses of #find & #search...

Hi Svetlana, your solutions, excel formulas... are really really great. I am new in my field "MIS" and I just found these sites, now I am learning a lot from the links and the formulas and the new things you provide. Thank you very much. Appreciated.

Hi Suliman,

Thank you for your feedback! I am really pleased to know that you have found our tutorials helpful.

Hi,

I have a problem in excel for find and pest,

The problem is "in a excel one page i have some numbers(123456), same page same number included in some words(abcd123456), so i can find out based on any formula please let me know, i am waiting.

AFAIC tha'ts the best answer so far!

IF A2's value = O and B2's value = Y then take date from C2 and IF A2's value = O and B2's value = N then take date from D2 ELSE TAKE DATE "0"

Hi AJAY,

you can use the following nested IF functions:

=IF(AND(A2="o",B2="y"),C2, IF(AND(A2="o",B2="n"), D2, 0))

Hi there !!!

It would be much appreciated if anyone could help me to solve my problem:

I have sheets more than 500 in a workbook. My sheet names are 1,2,3,4,5 till 500. In each sheets I have a formula in a cell. Example : VLOOKUP(A1,A1:AL300,1,FALSE).

My request is that would it be possible to change A1 to A2 in sheet 2, A3 in sheet 3, A4 in sheet 4, till Sheet 500 automatically?

It is very difficult to change manually for this 500 sheets.

Looking forward to hearing from you soon.

Kind regards

Alex

ya it is possible

Yes it is possible through advance excel (macro)

Hi,

Thanks for posting this. It's awesome.

How do I extract the middle text "Regional1" Company1 and material1 for the example below? The text strings are not always the same. I tried combining the find but I just couldn't get it to work.

12345-LAC-600-Regional1-Company1-Material1-US

Thanks

From you question I am not sure what you are attempting to accomplish but I will post a solution assuming that the phrase is located in B12 and you want "Regional1-Company1-Material1" located in another cell. The solution works as long as the number of dashes before and in the extracted information does not change. The number of characters before or after the dashes is irrelevant.

=MID(B12,SEARCH("^",SUBSTITUTE(B12,"-","^",3))+1,SEARCH("^",SUBSTITUTE(B12,"-","^",6))-1-SEARCH("^",SUBSTITUTE(B12,"-","^",3)))

The first SEARCH has a nested SUBSTITUTE that ends up locating the third dash and the +1 tells MID to begin on the next character after the third dash. The second SEARCH has a nested SUBSTITUTE that ends up locating the sixth dash in the string and the -1 locates the character before the dash and then the final SEARCH is the same as the first but is subtracted from the second SEARCH to tell MID the number of characters situated between the third and sixth dashes.

If you were actually attempting to place "Regional1", "Company1" and "Material1" in separate cells you would simply manipulate the formula in those separate cells to find the third and fourth dash, fourth and fifth, and fifth and sixth dash. NOTE: The last number in each SUBSTITUTE would be the only thing that changes.

i want to know month position no in particular cell

=IF(COUNT(SEARCH("ab",W25)),"1",IF(COUNT(SEARCH("cd",W25)),"2",IF(COUNT(SEARCH("ef",W25)),"3","0")))

from above formula result is fine, but if a cell(W25) contains both "ab" and "cd" it gives result as "1", where i required is "2". pls help how to search exact content.

Try =IFS(

COUNT(SEARCH("ef",W25))>1, "3",

COUNT(SEARCH("cd",W25))>1,"2",

COUNT(SEARCH("ab",W25))>1, "1" )

Thank you for posting the article. I am trying to do a find and replace on a large scale. i have an english and italian translation. I would like to find all the italian phrases and replace with english. Rather than do them one at the time i have thousands of different translations. i have a file in excell with english in column A and Italian in column B Please help!

Hi wannt to take only MSA from the P.IQ.MSA.FI.02.003.F002. please let me have the formula

Hi Svetlana,

I have few cells which had data like "adasd **red** asdfas"

I need to search all the cells which contains "**red**" string in it.

Could you please help.

Thanks

Create a helper column and try below

=ISNUMBER(SEARCH("**red**",Cell_with_text)

Hello Mrs. Svetlana...have a nice day

Problem sample:

Lets say I have data like this at A1 to A1000 with random code

And I want to find and display 765, 459, 111, 989

if i use filter it will display just one 765 or 459 or 111 or 989, or you can find them just using the scroll but that's the hardest way, i have to look one by one to find the data.

I just want the easy way like if i type 765;59;111;989 the data will display at the table sheet all of them not one by one.

have you found data like this? Please Share the formula.

My, best regard.

thank you.

I want to check whether an exact number exist in an array of numbers. For example, I have a list of numbers from A1.C10. I want to check whether a number 10.5 is in this list. If it is, the result can be True or False, if it isn't.

Hi,

Try below

=SUMPRODUCT(COUNTIF(10.5,A1:C10)=1

=IF(COUNTIF(A1:C10,"10.5")>0,"True","False")

@Anthony, This formula will help you incase if you were looking for solution

I have some 3 condition are as follows

1342435-2

2-5446465-0

1131486

i need to remove the number before and after the "-"dash using formula. these all 3 condition should be met

Supose i have this sentance -- "Can verified list be used from an earlier project of another client targeting same technology?",

and i want any alphabate count. then what will be the easy formullas?

Hello Madhurjaya,

If you want to count all characters in a cell, you can use the LEN function as demonstrated in this tutorial:

https://www.ablebits.com/office-addins-blog/2016/06/08/excel-len-functions-count-characters-cell/

If you are looking for something different, please clarify.

Hi Svetlana,

I would like to use a function to do this...

IF A2 contain the text in A1 give me 1, if A3 contain the text in A1 give me 2, ELSE give me 0.

suggestion? The find function seems not to work as it gives #VALUE! and stops this function:

=IF(FIND(CELL("contenut",A1),$A$2)>=1,1,(IF(FIND(CELL("contenut",A1),$A$3)>=1,2,0)))

Hi, need help if this can work in excel

C2 have a phrase stated as "Old maiden character"

C3 have a phrase stated as "Old tatoo artist"

what I want to happen in D2 and D3 cell is to search for the word "Old" in the cell C:C, and if it is found D cell will generate the word "Old"

is this possible?

I want such a formula, If I put the a string value then it will give me the whole value of that cell.

For example: if in Cell A2 have value "merge a fund" and I want to search by only fund, fun, fu,f. Cell A2 should be highlighted

Hi, how to replace the following standard descriptions

Standard Description : OSL MDF 17mm 8x4 Chocolate 18678

Example Description : Shade: 18678 col: Chocolate OSL 8x4 board

Regards

D S Shivarudra

Hi,

Could you please teach me how to I extract words before and after Bin or Bt, such as name below

Nor lina Bt Hussan, Ahmad B Mohdmmad Rozali

I need a fomula that can seperate first name and last name. Since I have a long list of names full of different word length before and after Bin or Bt.

Please help me with this. Thank you for your help

Maam,

your Tutorial is very helpful. now excel easy for me only bcz of youuuuuuu

thank u

Suggested Edit:

"Unlike FIND, the SEARCH function is case-insensitive and it allows using the wildcard characters, as demonstrated in the following example"

the statement that says "SEARCH function is case-sensitive" is false, the SEARCH function IS NOT case-sensitive...

Hi, with regards to the extracting a value between parentheses ().. if a cell doesn't have these a #VALUE! appears. How do I remove this? i.e with an IF "" included? Formula I have is as follows:

=MID(C5,FIND("(",C5)+1,FIND(")",C5)-FIND("(",C5)-1)

Thanks in advance

Try embedding your MID function inside of an IF(ISERROR()) function.

e.g.,

=IF(ISERROR(MID(C5,FIND("(",C5)+1,FIND(")",C5)-FIND("(",C5)-1)),"",MID(C5,FIND("(",C5)+1,FIND(")",C5)-FIND("(",C5)-1))

Paul: use IFERROR... it's cleaner.

=IFERROR(MID(C5,FIND("(",C5)+1,FIND(")",C5)-FIND("(",C5)-1),"")

i had contain data as 30\EE-III\2016-17 1st final bill ,please help to delete 1st final bill from my data. because i had nearly thousands cells in cell

sorry i had not defined problem correctly,

i had contain data as

30\EE-III\2016-17 1st and final bill and

50\EE_II\2015-16 5th and final bill

like this i had 2000+ cells containing different type data ending with 3rd and final ill like this

,please help to delete 1st and final bill, 5th and final bill like so on...

excel sheet,list of vehicle num bt find the one vehicle num what used to formula

Dividing data such as

6003-0-18-19

6059-0-7-54

1550-1-0-4

seperated by "-"

Hi, how can i apply @FIND to a range of cells. pls advise.

Hi, i'm making the attendance sheet and i want to showing days of Absent and weekly Off in specific cell like below format. but i can't able to do this by if and find formulas. so please help me....

date- 01 02 03 04 05 Absent OFF

A P A P A 01,02,05

P O P O P 02,04

Hi,

I just want to ask, I need to search how many transaction was made in an hour, can you help me please, ex. hour 10:00:01 AM to 10:59:00 AM. I need to get how many transaction was made between the said hour

Thanks

Easy... pivot tables

I am trying to use the find/count to pull apart a list of names that I was given.

This is format...LastNameLastNameFirstNamePosition with no spaces.

eg...BlowBlowJoeMgr which I want to change to Joe Blow

I was trying to use the Count/Upper functions to achieve this. So everything from the 2nd uppercase letter, to the third uppercase letter is last name and from 3rd to 4th is first name.

Thanks,

Ron

Good day,

Very new to posting stuff on these forums so please bear with me. I have an issue with a search formula.

I am doing multiple searches in a field. Doing the first half works but when I ad to this it no longer works.

Here is an example of the formula.

=IFERROR(IF(F3="Crutch - Taps","Crutch Taps",IF(F3="Gate Valves","Gate Valves",IF(SEARCH("Waste",F3)>0,"Waste",IF(SEARCH("Drain Cock",F3)>0,"Drain Cocks")))),"Others")

Hi All

I was hoping for some help. I need to extract the string which starts with either Z or A which is followed by 5 numerical characters; e.g.:

jd422290_backing_A54321sheet_960x1850_x_6_0

jf418407_Z12345_02_x9_1_0

a) A54321

b) Z12345

Any help would be appreciated.

Hi Svetlana!

Its really helpful post.

I have a query, in which i have to extract multiple columns into text on daily basis.

Kindly formulate a formula, in which each text in a column should have to be separated into separate columns.

A2=

B# 12/16, 09-NOV-16 , [C] , Company X [ Company Y ]

Required result:

| B# | 12/16 | 09-11-2016 | [C] | Company X | Company Y |

Looking forward for guidance

Regards

Hi

Can Search Function be used for array?

Hi! This is EXTREMELY helpful! Thank you for all your efforts. I was wondering if it is possible to use this in a more complex situation:

if the text string contains the word "doctor" or the word "facility", then I would like to add a category column, and have the word "Provider".

if the string contains "drug" then the category would be "Pharmacy", and so forth.

I was thinking of combining IF/THEN but it kinda blows my mind...

Any thoughts?

Thanks!

John

Ohio 44707 USA

Alabama 36609 USA

North Carolina 27591 USA

I want to extract data before any first number character. For ex.

In first example, I want to extract OHIO

In second example, I want to extract Alabama

In third example, I want to extract North Carolina.

Please anyone can help?

Hi Anand,

Not sure if you still need an answer but this will do what you require:

=TRIM(LEFT(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))-1))

Change A1 as appropriate

Hi Expert,

I have a problem using Search if there is same character on the beginning.

Here is my problem.

on column A i have this data:

A2=> Green;Apple

A3=> App;technology

A4=> Java; API

How can i get row that contains text "App"?

Thank you for your help

Hi there.... Just filter the column with contains as text.. Input text "app".

You will get all rows where appword is found

Hi there.... Just filter the column with contains as text.. Input text "app".

You will get all rows where appword is found

I am trying to figure out how to remove the last few characters of text strings in a table that are not all the same length and last 3 characters are different.

WM08-04358*A 1 to display as WM08-04358

CLX-87390*B 3 to display as CLX-87390

Any suggestions are appreciated!

Try LEFT function along with LEN:

=LEFT(A1,LEN(A1)-3)

where A1 contains your text string.

Or, you can use our add-in.

Hi, I have a requirement where in there are 10 parameters. Each parameter would result in different complexities from Very low complexity to Very high complexity. Based on these complexities an overall complexity should be arrived at.If 2 of the parameters result in very high complexity and the remaining are other complexities then the end result would be very high complexity. Like wise for other complexities from top to low. Could you please help in writing a formula for this.

Thanks

Prashant

I have this formula =IF(ISNUMBER(SEARCH(D$1,L41&M41)),A41,"") every thing was perfect but than I found that this formula is searching some words from A1 that match in L41& M41 . example I only wanted XXX YYY ZZZ but it also displaying XXX only

Hi, could you advise for my below sample?

Text sample 1: Creat highchart 4.0.418.02%91.98%-0.80%Fixed IncomeEquityOthersLoan010203

Text sample 2: Creat highchart 4.0.49.00%92.00%EquityReal Estate04020

I want to extract 2 text from each text sample above:

A. Start after 4.0.4 till the last %

B. Start from last % till before the first number show(the first number is always 0)

That is: "18.02%91.98%-0.80%" and "Fixed IncomeEquityOthersLoan" from text sample 1

"9.00%92.00%" and "EquityReal Estate" from text sample 2

The difficulty is the number of % occurrences is not fixed and the length of last number is not fixed. I'm thinking if there is a way to find position of the first % starting from right? I really got stuck here. Thanks for help in advance!

Hi,

My data is like this:

Cell A: location (duplicate values)

Cell B: Revenue from those locations (positive and negative values)

Cell C: Month value

For a particular location (multiple values), I would like to get the value of the month when the revenue was greater than zero for the first time.

Can someone help me with this?

Thanks!

Hi, How to get the result for Search Function by selecting the range

Ex Search("Lucy",A1:A10)

OK, I'm stuck.... somebody please help me out.

I have over 110 unique 7 digit values in Column B (50144815) and I need to see if/where in my spreadsheet they exist (in a different row in Column C).

Column C is 450 rows long and the unique 7 digit numbers would be hidden in a test string as exampled below:

"Retracement Survey of Alba, PID 50144815, Plan# 89584, unsigned digital copy, unsigned paper copy 53"

Vlookup works when it's only numbers comparing numbers, but when there is text and numbers together is seems to be choking up and not returning results.

Hello, Wesside,

you can try using VLOOKUP with wildcard characters (asterisk in particular). It enables searching for any sequence of characters within the cell.

Please take a look at these examples to learn how to level your formula up.

Another variant would be to use conditional formatting to highlight the row with the occurred values. And we have just a perfect tutorial for that either :)

Hope this info will be helpful!

Fabulous! I'll give it a try, was currently trying variations of "index and Match" functions

Ah, still having some trouble with this...

the * * trick doesn't seem to work using my limited knowledge of excel lol.

basically I want to compare column B (108 rows) to see where those number are in Column C (450 rows).

I had a "bit" of success but not much.

Then I tried this formula =vlookup('[Escrow108.xlsx]CBO Tab#2 - Other DNR'!$B$2:$B$109,O:O,1,FALSE)

I tried taking Column B and putting into another work sheet, then VLookup to compare column B on sheet 1 with column C on sheet 2, nope, even less success. The formula I used seems to stop searching at row 109 in column c...PLUS it isn't finding numbers in column c that I know exist in column b.

ASLO, i should note that in some cases, 3 rows of Column B might be listed in the text for 1 row of column C.

Hi, can you help me to find out "either" "or" condition in excel. also how to find probability from any data.

Hi,can you help me,right function in how using "len" function

Hi How to use ISnumber and search formula to find couple of words from one text. Ex I am trying to find either "SHAW or "SHW" from this particular text "GL123456-Defee SR Heloc FR PCI LAND-SHAW"? I am using the formuls Is number(Search"SHAW",text")) and it returns with True or false result which is fine. But I want to embed word"SHW" too in the formula so I can find if the account is SHAW or SHW. How can I do that? I hope I am making sense and able to explain it.

Appreciate the help.

Thanks!!

POD CONTAINER SIZE TOTAL 40HQ reqirued result

KRPUS 40HQ x 1; 40GP x 10 ; =MID(B5,SEARCH("HQ",B5)+1,(SEARCH(";",A2)-SEARCH("HQ",B5))-1) 1

PKKHI 20GP x 1 ; 40HQ x 100 ; 40GP x 1 ; 100

USNYC 20GP x 1 ; 40HQ x 12 ; 40GP x 200 ; 12

Kindly assit me to correct above code

I am trying to find a way to search a specific combination of letters in a list of words. For example, lets say I have a list of 100 words and I want to find all of the words that have exactly 1 A and 1 U in them and they don't have to be consecutive. Mutate, jaunt, magnum are examples that would meet my criterion. Does anyone know how to do this? Thanks.

Also, if possible I would like to be able "extract" (if that is the right term) those letters in alphabetical order into the cell to the right of the word. Eventually, I will sort the list of words and the extracted letters by the extracted letters to group the words that have the A and U.

Hello,

I believe you could use our Advanced Find & Replace add-in. On the first step you choose all your 100 rows and set the letter "A" as a search criterion. Then, you can:

1. either select all the found rows/columns/entries and run the new search over the selection with the letter "U" as a criterion OR

2. export the found entries to another workbook and run the search for the letter "u".

You can learn how the add-in works on its help page.

As for the second part of your task, I'm afraid you will need to use some kind of the VBA, but for that please ask around Mr. Excel forum.

Hope this helps!

Hi,

I am trying to find a formula to yield the word to the left of the first space at the right. For example in the first item below, I would want the formula to result in BRAZR. The reason I cant work from the left (or at least I cant seem to) is there is a different number of spaces to get to the word to the left of the last space on the right as you can see below with the other examples. Could you please help me out with this??

XXX 5C-15 HZ BRAZR 3-14-47-14

XXX KARR 13-28-65-3

XXX HZ LEDUC-WB 16-9-49-25

XXX HZ BANTRY 4-21-19-13

Much appreciated.

6601280012088

How do I extract the 7th number. =mid(C7,7,1)

if greater/equal to 7 - indicate "Male" otherwise "Female"

Hi,

I'm using the below formula to extract data (equipment number) with a hyphen. For example, cell contains:

V-1770A BLAST/PAINT EXTERNAL SURFACE (#17337C)

the formula:

=TRIM(MID(SUBSTITUTE(E3080," ",REPT(" ",99)),MAX(1,FIND("V-",SUBSTITUTE(E3080," ",REPT(" ",99)))-50),99))

returns the results:

V-1770A

The formula works great, but I have to change the FIND find_text parameter for each line.

Examples of various data lines:

I-1602 A/B "DRYER" DEMO SCAFFOLD # 2080 (#17324A)

E-1403 "IN/OUTLET VALVE " DEMO SCAFFOLD #2076 (#17324A)

C-1407 "INSPECTION WINDOWS" REPLACE METAL/SEALANT (#17324B)

T-1311C "ROOF TOP NOZZLES" CLEAN/PAINT (#17324C)

V-1770A BLAST/PAINT EXTERNAL SURFACE (#17337C)

No matter where the information is on the line the formula works, but I do not want to have to edit the formula each time the equipment letter changes.

I've tried using a Define Name table in the find_text parameter, but that does not work. Returns #VALUE.

Any suggestions or help would be greatly appreciated.

Hi,

I have a column with multi-word text strings, I'd like to look in that text and for any cell in the column that contains one of three (e.g.) words, I'd like to return "X", else "Y".

For example, if the text contains 'green', 'blue' or 'purple' I'd like the result to be 'cool' else 'warm'

COL A COL B (result)

light pink warm

forest green cool

ocean blue cool

burnt orange warm

thanks,

sorry...didn't know spaces wouldn't be retained.

Col A | Col B(result)

light pink | warm

forest green | cool

ocean blue | cool

burnt orange | warm

Nevermind...unless there is an easier solution.

This works:

=IFERROR(IF(FIND("GREEN",$BJ34),"Cool","Warm"),IFERROR(IF(FIND("BLUE",$BJ34),"Cool","Warm"),IFERROR(IF(FIND("PURPLE",$BJ34),"Cool","Warm"),"Warm")))

I suppose 'Search' instead of 'Find' is optional if there is concern about being case-sensitive.

In one tab ('Orchard details')of a spreadsheet I have a list of our 14 orchards and their respective varieties in each orchard. Some orchards have more than one variety. Some orchards have the same variety as other orchards. One field in the list is fallow at present. This list is in cells AA6:AA27. In another tab ('Orchard varieties'), I want to create just a list of the varieties that we grow taken from the 'Orchard details' list, reporting the (orchard varieties' tab in cells B93:B105. As we grub old orchards and plant new ones we may change the variety so the 'Orchard varieties' list would need to change as we replant our orchardsand record them in the 'Orchard details' list. Thank you.

Hi,

Great set of examples on how to go about finding stuff in excel cells. I have a question though which i haven't found in your examples (or overlooked). I get a data dump with a json string in a cell. In json there is a lot of use of the " character. I can't seem to figure out how to look for a " in a cell.

Placing it in '"' (single quotes surrounding the ") didn't help either. Is this at all possible and if so how?

Hi Remi,

Please try to use one of the following formulas:

1. =FIND("""",A1)

2. =FIND(CHAR(34),A1)

Hope this will work for you.

Hello. This page is great. Thank you for sharing. Question, Your number 4, Find text between parentheses.... How do I apply this to multiple to an excel sheet that has many multiple lines of data? Each Line will have information in parentheses and we would like to pull the information within the parentheses from each line? Would I need to apply the formula =MID(D1,SEARCH("(",D1),SEARCH(")",D1)-SEARCH("(",D1)+1) to each line of data or is there an easy way to drag and select multiple line? (I know this formula includes the parentheses, which is what we want). Thanks!

Hello,

I'm afraid there's no easy way to solve your task with a formula. Using a VBA macro would be the best option here.

However, since we do not cover the programming area (VBA-related questions), I can advice you to try and look for the solution in VBA sections on mrexcel.com or excelforum.com.

Sorry I can't assist you better.

Wonderful.

Thank you

Hi,

I have a problem in excel for find and pest,

The problem is "in a excel one page i have some numbers(123456), same page same number included in some words(abcd123456), so i can find out based on any formula please let me know, i am waiting.

Ma'am Lets say i have (3242*4643) and i have to extract from ( to * then what would i have to do?

=LEFT(A1,FIND("*",A1))

Hi,

I would like to ask on how to create a formula in searching one word to another tab. Like for example, i need to get the word apple in other tab but the word from that tab is apple pie, the formula i need is to get all with the word apple.

Thanks in advance

Can someone clarify my surmise: EXCEL does not support searching of text with wild card that involve MULTIPLE Criteria Using the FILTER menu. Say,

Finding all the records in which the Name filed either BEGINS with John OR ends with Higgins? I tried and and not get the desired results; it does not report error but gives only those records satisfying first criterion.

SEARCH is not case sensitive. Please correct.

Hello,

The article says that FIND is case-sensitive and SEARCH is case-

insensitive. That's exactly what you say :)Hi Svetlana, I am trying to use Find or Search function for multiple conditions, how can I use this?

I have a table where I want to extract the first name from full name but the values are not consistent. I am getting different values in different cells for example:

Full Name:

Derek Gorgi

Jonathan, Kelly

Now I am trying to extract the first name before " " and/or before "," then how can I use Find or Search function to get the First Name without Space or comma

To get the First value where I was getting only space, I was using the following formula as shown below but not sure how can I inculcate multiple search criteria as mentioned above.

=LEFT(A2, FIND(" ",A2,1)-1)

Please help.

Thanks

Sandeep

hello sandeep sir..

according to me..

no need to apply (-1) in the formula =LEFT(A2, FIND(" ",A2,1)-1)

formula is:

=LEFT(A2,FIND(" ",A2,1))

Hi Svetlana! I think I posted this question in the wrong topic, so posting again here with more details.

I need to extract a string between two other strings (a word and a character) within a cell, but those other strings may repeat inside the cell at different intervals.

For example - a scanning tool conducts several tests and returns all of the results within a cell, but we only want information on the failures

multi-line cell example:

Test: Endpoint

Result: Pass

Details: Endpoint Connected

*****

Test: Resolution

Result: Fail

Details: Unable to resolve FQDN

*****

Test: Port

Result: Fail

Details: Port 1234 does not respond

We initially tried to re-organize the output using text to columns but it seems to be thrown off by the carriage returns inside the cell and ideally, we want to wan).

So we're left with searching for some combination of MID, SEARCH, and maybe LEN functions? but it's proving very difficult. It's easy to find the first instance of "Failed", but to then find the stopping point which has to be the very next "^" char after that instance of "Failed", while also then being able to repeat the extraction for any other Failed tests inside the same cell.

Svetlana, I can't thank you enough for sharing this knowledge with us!

These functions are super useful when used appropriately, and you've given an excellent explanation of how and where to use these. Rock on.

What if...

A1 UK-USA and B1 1-0

A2 USA-UK B2 0-1

A3 USA-UK B3 4-3

A4 UK-USA B4 2-1

A5 UK-USA etc.

A6 USA-UK

etc.

How to return with a function ALL UK results in left-right order in C1... like

C1 is 1-0

C2 is 1-0

C3 is 3-4

C4 is 2-1

etc.

Thanks...

Hi,

I require to find out the number of spaces before any text in a cell from starting. For Example:

" A56020 - Depr - buildings"

We have to find out the length of blanks before any first text. Here blanks are 20 before first text (here first text is A, it is different in different cells).

Any help is of great help.

Thanks,

DG

i have several file names extracted to excel with the "009-?-????" string as part of the filename. i need to extract this string from the remaining file name. the question marks are wild card.

Hi,

To get around the #VALUE problem, you can use the ISERROR() function. For example, if you have a cell, A1, and you want to check the position of the letter p, you can use:

=IF(ISERROR(FIND("p",A1)),0,FIND("p",A1))

If the letter p is present, this will report the position. If not, it will report 0.

The first section, ISERROR(FIND("p",A1)), determines if p is present. If not, the IF returns 0. If there is no error, the IF then looks again for p and reports its actual position.

hello madam..

good morning..

we want some help from you..

we just want to confirm why we use find and replace formula...

we use find and replace formula from home menu or by pressing(ctrl+f)..

Hello,

I am trying to figure out how to do the following:

Count the number of cells which have the character + within the word.

Each of over 60 columns will have a different word.

E.g. BOB+CAT, DOG+BIRD, CAN+, etc.

Count Number of Cells That Contain Specific Character

=COUNTIF(A23:A29,"*+*")

Where A23:A29 is the range of cells you want to count the number of times the “+” character is in the text.

Hi,

I have a problem in excel for find and pest,

The problem is "in a excel one page i have some numbers(123456), same page same number included in some words(abcd123456), so i can find out based on any formula please let me know, i am waiting.

Absolutely the best post that I found on this subject!

This is comprehensive and detailled, yet very clear and easy to understand. The choice of examples just adds to that.

Thank you very much, this post was truly helpful.

Kindest regards

Pieter

col A contains some set of strings, Col B contains some Sub-strings , and the corresponding coloumn C should return values of string which contains the particular substring.

what formula can be used to pull out the string which contains this particular sub-string

Col A Col B col C

ABCD-alpha rain rainrain-rhyme

1234-num abc ABCD-alpha

rainrain-rhyme numb 1234-num

Lavanya:

Here's a formula that works if there are no duplicates,

=IFERROR(INDEX($A$1:$A$5,MATCH(TRUE,INDEX(ISNUMBER(SEARCH(B1,$A$1:$A$5)),,),0)),"No Match")

Just copy this down the C column and it will return the string from the A column that contains the sub-string found in the B column.

You can expand the $A$1:$A$5 range. The B1 will change as you copy it down the C column.

FYI, the "numb" in your sample will return the "No Match".

i want to find a text 'P' in a string which is then followed by 3 numbers. The 3 numbers can be anything.

If I understand your question this formula should work.

Where "P123" is in A44 enter this in an empty cell:

=MID(A44,FIND("P",A44),1)

In my target string, the substring i want to extract is of the form Mxx - the letter M followed by a two digit number. THe target string will only have one occurrence of such a substring. The position of it though, is not fixed. For example:

F_8_M01_MASTER_MARKS_V15 - I am looking for M01.

F_8_M17_PTLY_XTV_V6 - I want to extract M17.

KB1F_MESURE_M34_FIN_V01.2 - I want to extract M34

How can I do that?

DesperatelyNeedHelp:

Here's a formula that will search a string and return the value you enter into a cell.

You can do it two ways I'll show you both and you can decide which one works best for you.

OK, you can enter the search value directly into the formula like this;

Where F_8_M17_PTLY_XTV_V6 is in B13 enter this formula into an empty cell.

=IF(B13="","",IF(ISNUMBER(SEARCH("M17",B13)),"M17"))

Alternatively you can enter the search value into a cell and reference that cell in the formula like this:

=IF(B13="","",IF(ISNUMBER(SEARCH(D2,B13)),D2))

Where F_8_M17_PTLY_XTV_V6 is in B13 and you enter M17 into D2 this will return M17 into the cell where this formula is.

Hi there,

I'm trying to fill in some missing data in my excel sheet. The method I am using is substitution where I have 6 columns. For example:

(Day) (Hour) (Wind direction) (wind speed) (stability) (rain in inches)

If I am missing the wind direction and wind speed I will look 2 weeks prior or after the missing data point for the same hour and stability and substitute those values in for the missing values. I used vlookup before and it would substitute from the top of the column or bottom but never the values closest from the missing data. My question is, is there a better method than the vlookup, would the find or search functions work? Or is there a method for vlookup to start from the missing data point and work away rather than starting from the top or bottom of the 2 week gap?

Hi

My Name is Mukesh Singh

Sir I have a query

Apple iPhone 6 32 GB Gold

I want "32 GB" in a separate cell using formula

Please help me to solve

Mukesh:

Why not use the Text-to-Columns tool and set the 32 GB into its own column?

There is a sentences in cell so how can v find number value in that sentence

Example:- i want to buy apple fruits of cost $50 per piece so I want retrieve only $50 from cell by using formulae

I have a full column of text with alphabetic as well numeric data, E.g 428538, 42H11, 225FL560, so what i want to do is if the text doesn't contain any Alphabet then I will take the last 2 numeric values as my req. data, but if the text contains alphabet then the letters needed are all letters before that as for 42H11=42, and for 225FL560=225, but also if the number before the alphabet are having more than 2 digits then the data needed is in the form of /10 so, e.g I will be needing output from 225FL560 as 22.5 and from 42H11 as 42, kindly help me..... thanks in avance...

Question? What formula could I use to search for a number value in a cell and give me the text description in the cell next to it

Lets say

A1= 8810 B2= Clerical

How do I create a formula to search for the number 8810 and bring up the Clerical description?

Amber:

I think you should try an approach that uses VLOOKUP.

The description and examples are here on AbleBits at:

https://www.ablebits.com/office-addins-blog/2014/07/17/excel-vlookup-tutorial-beginner/

Hello!

I would like to convert a string "John Watson Dalton" to "jwdalton". Can you help me?

I am trying to copy just the characters between the 2nd space and the 4th space. For instance, for the following cells, I want only "Lebron James" and Giannis Antetekounmpo" and Nikola Jokic". What would the formula be for this? Thank you.

L. James LeBron James SF/PF

G. Antetokounmpo Giannis Antetokounmpo SF/PF

N. Jokic Nikola Jokic C

Hello,

I have a excel sheet of attendance, For Example Employee Name:- Ajay Kumar Time :-09:06 J.p Site

And i want to create a new excel sheet which link with our attendance sheet . for example whenever Ajay kumar present on site So our new sheet will automatically appear in the present. What would the Formula be for this? Thank you.

Present Attendance Sheet

1. Ajay Kumar 09:06(J.P SITE)

New Attendance Sheet

1. Ajay Kumar (P) Show only present

Hi,

In the above example 3 "Extract N characters following a certain character", i see there is 3rd argument formulae, similar to that i have (4th and last argument) and (4th, 5th and last argument).

Ex 1: 123-345-456-78-46

Ex 2: 234-793-42-856-674-123

Ex 3: 123-345-456-789

i have numerous recrods/rows. i would like to split after "-" into each cell. I have tried to split using text to columns it worked out. But i would like to use the formulaes similar to example 3.

Can anyone help me to split the data, please.

i got to say, your explanations provided me with a better understanding of the formula i was looking for. incase someone else is losing head over the same, below is a formula for returning text begining with "P" but ending before either " " or "-" =IF((SEARCH("-",C2))>(SEARCH(" ",C2,5)),MID(C2,SEARCH("P",C2),SEARCH(" ",C2,5)-SEARCH("p",C2)),MID(C2,SEARCH("P",C2),SEARCH("-",C2)-SEARCH("p",C2)))

I currently have a formula that returns the last letter of T using this function:

=RIGHT(E2,LEN(E2)-SEARCH("-",E2)-4)

TB003-0144T

I currently have a formula that returns the last letter of T using this function:

=RIGHT(E2,LEN(E2)-SEARCH("-",E2)-4)

I then filter the data from there.......

I would like to search for multiple characters such as P, O , T.

Is there a function I can use to search for a set of letters without using advance filters?

Do you recommend just using advance filtering, if so what do I put into the criteria to find the numbers with Multiple characters.

B003-0144T

B003-0144P

B003-0144P

B003-0144P

B003-0144O

B003-0144O

B003-0144O

B003-0144E

B003-0144A

Thanks,

Willie

Hi and thank you for the article.

Has anyone a suggestion on how to use a whole named range as the Search or Find Value?

Best, Phil

Pass

Fail

Fail

Fail

Fail

I need "Pass" text separate from above list

Hi sir,

My name Niru,

My query is latest 10 days sales

Use Excel formulas.

Hi,

This was to solve on the 60,000 data ,

Thanks & regards

Dear, I am looking for the solution of occurrence of a repeated characters in a cell. I have data of contact numbers, like 01150000011, 01171222229, 01129999917 etc. I want to identify cells that have 5 or more than 5 consecutive numbers in phone number ( like 0 five times in first phone, 2 five times in 2nd phone and 9 six times in 3rd phone).

Hi Guys, my questions is straight forward:)

I have a column that has lots of sets of numbers but i want to extract only numbers that starts with 7 from left.

Thanks

Abdel

How to find Word'd position in string in Cell in Excel?

Example:

India, UK, USA, RSA (in A1)

UK (in B1)

Expected result in A2 2.

Where 2 is the position of word in A1. Like if RSA in B1 the answer should 4.

HI All,

look for guidance for I want find 1st character what the formula will be if my column got 2 criteria which is I want only show help what my formula will be?

1. help_request 123/123

2. help request 123/123

I want to find continues absent greater than 4 days like below

Amit AAAAAPPPPPPA Yes

Arun PAPPAPPPAPA NO