Search for word in cell

seacrest

Active Member
Joined
Aug 15, 2002
Messages
301
I want to find and certain word in a certain cell.This word will most likely be in a sentence.Can this be done without using vba
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
On 2002-10-05 04:30, seacrest wrote:
I want to find and certain word in a certain cell.This word will most likely be in a sentence.Can this be done without using vba

Have you looked @ Find or Search
Have a look @ Online help for these Functions
 
Upvote 0
Thanks Ivan but i need this to be built into my spreadsheet can you return a word from a sentence on a given cell.?With or without vba
 
Upvote 0
On 2002-10-05 04:51, seacrest wrote:
Thanks Ivan but i need this to be built into my spreadsheet can you return a word from a sentence on a given cell.?With or without vba

Care to give some examples of sentences and the words that must be returned?
 
Upvote 0
Hi seacrest.

In cell B1 give cow. In C1 give formula =LEN(B1).

In A2 Your sentence: 'The cow jumped over the moon .

In B2 formula:

=IF(ISERROR((TEXT(MID(SUBSTITUTE(A2," "," "),SEARCH(B1,SUBSTITUTE(A2," "," ")),C1),255))),"Not found";(TEXT(MID(SUBSTITUTE(A2," "," "),SEARCH(B1,SUBSTITUTE(A2," "," ")),C1),255)))

There is sure more simple answers, but this is mine.

Regards Sir Vili.
 
Upvote 0
Thanks Sir Villi that worked well however there was a bad character after "Not Found"
It works great thanks again
 
Upvote 0
On 2002-10-05 05:36, seacrest wrote:
The cow jumped over the moon (Need to return cow)

Let A2 house the sentence and D2 the word "cow".

In B2 enter:

=IF(ISNUMBER(SEARCH(D2,A2)),D2,"Not Found")
 
Upvote 0
[TABLE="width: 747"]
<TBODY>[TR]
[TD] [/TD]
[TD]A</SPAN>[/TD]
[TD]B</SPAN>[/TD]
[/TR]
[TR]
[TD="align: right"]1</SPAN>[/TD]
[TD]Site-Id(SH.Name2)</SPAN>[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]2</SPAN>[/TD]
[TD]IN03XC115</SPAN>[/TD]
[TD]Here's where I need my formula to search for A2 in the next tab called 'Sprint MMBS Inbox'</SPAN>[/TD]
[/TR]
[TR]
[TD="align: right"]3</SPAN>[/TD]
[TD]NY33HO062</SPAN>[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]4</SPAN>[/TD]
[TD]NY33HO062</SPAN>[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]5</SPAN>[/TD]
[TD]NY33HO062</SPAN>[/TD]
[TD] [/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,224,315
Messages
6,177,847
Members
452,810
Latest member
jeffrey0409

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