Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,045
Default Identifying text in a string

On Mon, 18 Mar 2013 15:37:58 +0000, otteraaron wrote:


Hello,

First, I apologize if this has been answered already. I did some
searching and had no luck finding a solution.

Here's what I'm looking to do: I have a long list of text strings, and
i'm looking to identify certain keywords, and report back those
keywords.

EXAMPLE:
Column A is full of product descriptions:

Black Otterbox Case for iPhone
Blue Speck case for iphone
Pink Otterbox case for GS3
White Case Mate case for iphone 5
Blue Otterbox case for iphone 4s

Column B are the "brands" i'm searching for:
OtterBox
Case Mate
Speck

I would like to have a formula that searches for words in Column B
located in Column A, then report back that word.

Example, if A1 was "Black Otterbox case for iPhone", i would want the
result in column c to read "OtterBox"

Make sense? Thanks in advance for any help you can provide!!


It appears that you want C1 to show the Brand in the string in A1.

With your brands listed in column B1:B3

C1: =LOOKUP(2,1/ISNUMBER(SEARCH($B$1:$B$3,A1)),$B$1:$B$3)

Adjust the B1:B3 range to encompass your full list of brands.

This approach can cause problems if you have two brands that have very similar names, where one is contained within the other.
For example, consider two different brands:

Otter
Otterbox

In this case, both Otter, and Otterbox would be "found" in A1. However, the formula only returns the last valid match. One solution is, when you have such a situation, be sure to list the longer brand below the shorter brand in the list.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying the presence of a randomly ordered text string in a cell AG[_3_] Excel Worksheet Functions 2 September 3rd 09 10:21 PM
identifying text associated with MIN value vanessa Excel Discussion (Misc queries) 4 October 17th 08 06:12 PM
identifying the first character in a string dstiefe Excel Programming 1 March 15th 06 01:19 AM
identifying a string of positive numbers mcarrington Excel Worksheet Functions 1 January 13th 06 12:34 AM
Identifying Text STEVEB Excel Programming 3 September 21st 05 06:18 PM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"