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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
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
A</SPAN>B</SPAN>
1</SPAN>Site-Id(SH.Name2)</SPAN>
2</SPAN>IN03XC115</SPAN>Here's where I need my formula to search for A2 in the next tab called 'Sprint MMBS Inbox'</SPAN>
3</SPAN>NY33HO062</SPAN>
4</SPAN>NY33HO062</SPAN>
5</SPAN>NY33HO062</SPAN>

<TBODY>
</TBODY><COLGROUP><COL><COL><COL></COLGROUP>
 
Upvote 0

Forum statistics

Threads
1,214,891
Messages
6,122,105
Members
449,066
Latest member
Andyg666

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