Search formula with continued text

RPrasad

Board Regular
Joined
Mar 22, 2008
Messages
144
[TABLE="width: 350"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]
Hi - need help on "Search" formula. Below is the example. When I put the search formula in B1 and B2 it shows the same result as the text continues

what I am looking is in B2 it should return error as "Term1" is not there in A2. could you please help how to do it? Thanks,

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Column A[/TD]
[TD]Column B[/TD]
[TD]Result in col B[/TD]
[/TR]
[TR]
[TD]Term1[/TD]
[TD]=SEARCH("Term1",A1)[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Term16[/TD]
[TD]=SEARCH("Term1",A2)[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]

[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Re: Help on search formula with continued text

Hi
Try
Code:
B1=FIND("Term1";A1)
B2=FIND("Term1";A2)
 
Last edited:
Upvote 0
Re: Help on search formula with continued text

Hi tried the above code, still result is same.

as "Term1" contains in "Term16" the formula is reading only first few characters to match the result as son as it finds.
 
Upvote 0
Re: Help on search formula with continued text

How about
=SEARCH("Term1 ",A1&" ")
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,193
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top