Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default Extract names from string based on value list

I have a list of productnames and a list of brandnames.

I want to supply the productnames with an attribute "Brand".

I am currently manually filtering the list of productnames based on
"Contains... Brand" and adding the Brand to the product using copy paste,
but this takes me too long and I can only match records one brand at a time.

Can I make Excell search through the list of productnames and whenever it
comes across a brandname within the string of a productname it will add it to
the column next to it?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Extract names from string based on value list

One way
Assume productnames running in A2 down
Assume D2:D10 contains all the brands text

In B2, normal ENTER:
=INDEX($D$2:$D$10,MATCH(TRUE,INDEX(ISNUMBER(SEARCH ($D$2:$D$10,A2)),),0))
Copy down to return required results

If you need an error trap to return neat looking blanks for unmatched cases
(if any), use this in B2, normal ENTER, copied down:
=IF(ISNA(MATCH(TRUE,INDEX(ISNUMBER(SEARCH($D$2:$D$ 10,A2)),),0)),"",INDEX($D$2:$D$10,MATCH(TRUE,INDEX (ISNUMBER(SEARCH($D$2:$D$10,A2)),),0)))

Modify to suit. Voila? hit the YES below
--
Max
Singapore
xde
---
"Pluggie" wrote:
I have a list of productnames and a list of brandnames.

I want to supply the productnames with an attribute "Brand".

I am currently manually filtering the list of productnames based on
"Contains... Brand" and adding the Brand to the product using copy paste,
but this takes me too long and I can only match records one brand at a time.

Can I make Excell search through the list of productnames and whenever it
comes across a brandname within the string of a productname it will add it to
the column next to it?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Extract names from string based on value list

For the error trap, try this:

=LOOKUP("zzzzz",CHOOSE({1,2},"",INDEX($D$2:$D$10,M ATCH(TRUE,INDEX(ISNUMBER(SEARCH($D$2:$D$10,A2)),), 0))))

Only works with text.

--
Biff
Microsoft Excel MVP


"Max" wrote in message
...
One way
Assume productnames running in A2 down
Assume D2:D10 contains all the brands text

In B2, normal ENTER:
=INDEX($D$2:$D$10,MATCH(TRUE,INDEX(ISNUMBER(SEARCH ($D$2:$D$10,A2)),),0))
Copy down to return required results

If you need an error trap to return neat looking blanks for unmatched
cases
(if any), use this in B2, normal ENTER, copied down:
=IF(ISNA(MATCH(TRUE,INDEX(ISNUMBER(SEARCH($D$2:$D$ 10,A2)),),0)),"",INDEX($D$2:$D$10,MATCH(TRUE,INDEX (ISNUMBER(SEARCH($D$2:$D$10,A2)),),0)))

Modify to suit. Voila? hit the YES below
--
Max
Singapore
xde
---
"Pluggie" wrote:
I have a list of productnames and a list of brandnames.

I want to supply the productnames with an attribute "Brand".

I am currently manually filtering the list of productnames based on
"Contains... Brand" and adding the Brand to the product using copy paste,
but this takes me too long and I can only match records one brand at a
time.

Can I make Excell search through the list of productnames and whenever it
comes across a brandname within the string of a productname it will add
it to
the column next to it?



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
Extract number from text string based on number's format? MeatLightning Excel Discussion (Misc queries) 17 November 19th 08 01:08 AM
extract names based on conditions Bobak Excel Discussion (Misc queries) 2 September 3rd 08 08:16 PM
Extract a text string based on character kgiraffa Excel Worksheet Functions 5 March 14th 08 12:54 AM
Extract String based on condition Send Object Command - Two attachments Excel Discussion (Misc queries) 4 November 1st 05 09:06 PM
How do I extract the last name in Excel, from a list of names lik. RobertC Excel Worksheet Functions 4 November 17th 04 06:52 AM


All times are GMT +1. The time now is 09:53 PM.

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

About Us

"It's about Microsoft Excel"