Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Searching for strings in a column

Hi,
I have the following items in COL_A:

COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS

What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.

The result should look like this:

COL_A COL_B
------- -------
Mike B FALSE
GX270 FALSE
Notebook X TRUE
LunchRoom FALSE
New Printer FALSE
John VPN TRUE
Spare Laptop TRUE
Susan WS FALSE

I've been trying a VLOOKUP() function but it doesn't work as
expected. The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.

Thanks for your suggestions.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Searching for strings in a column

Enter these words in the cells stated:

D1: notebook
D2: VPN
D3: Laptop

then put this formula in B1:

=IF(OR(ISNUMBER(SEARCH(D$1,A1)),ISNUMBER(SEARCH(D$ 2,A1)),ISNUMBER
(SEARCH(D$3,A1))),TRUE,FALSE)

and copy down to B8.

Hope this helps.

Pete


On Jan 23, 2:21*pm, wrote:
Hi,
I have the following items in COL_A:

COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS

What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.

The result should look like this:

COL_A * * * *COL_B
------- * * *-------
Mike B * * * FALSE
GX270 * * * *FALSE
Notebook X * TRUE
LunchRoom * *FALSE
New Printer *FALSE
John VPN * * TRUE
Spare Laptop TRUE
Susan WS * * FALSE

I've been trying a VLOOKUP() function but it doesn't work as
expected. *The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.

Thanks for your suggestions.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Searching for strings in a column

Well, it surely works, thanks.

On Jan 23, 9:48*am, Pete_UK wrote:
Enter these words in the cells stated:

D1: * notebook
D2: * VPN
D3: * Laptop

then put this formula in B1:

=IF(OR(ISNUMBER(SEARCH(D$1,A1)),ISNUMBER(SEARCH(D$ 2,A1)),ISNUMBER
(SEARCH(D$3,A1))),TRUE,FALSE)

and copy down to B8.

Hope this helps.

Pete

On Jan 23, 2:21*pm, wrote:



Hi,
I have the following items in COL_A:


COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS


What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.


The result should look like this:


COL_A * * * *COL_B
------- * * *-------
Mike B * * * FALSE
GX270 * * * *FALSE
Notebook X * TRUE
LunchRoom * *FALSE
New Printer *FALSE
John VPN * * TRUE
Spare Laptop TRUE
Susan WS * * FALSE


I've been trying a VLOOKUP() function but it doesn't work as
expected. *The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.


Thanks for your suggestions.- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Searching for strings in a column

Try this:
=SUMPRODUCT(--ISNUMBER(SEARCH({"Laptop","VPN","notebook"},A1))) 0

or this:
=SUM(COUNTIF(A1,"*"&{"Laptop","VPN","notebook"}&"* "))0



" wrote:

Hi,
I have the following items in COL_A:

COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS

What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.

The result should look like this:

COL_A COL_B
------- -------
Mike B FALSE
GX270 FALSE
Notebook X TRUE
LunchRoom FALSE
New Printer FALSE
John VPN TRUE
Spare Laptop TRUE
Susan WS FALSE

I've been trying a VLOOKUP() function but it doesn't work as
expected. The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.

Thanks for your suggestions.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Searching for strings in a column

You're welcome - thanks for feeding back.

Pete

On Jan 23, 3:03*pm, wrote:
Well, it surely works, thanks.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Searching for strings in a column

Wow, I love this one :) Thanks.

On Jan 23, 10:06*am, Teethless mama
wrote:
Try this:
=SUMPRODUCT(--ISNUMBER(SEARCH({"Laptop","VPN","notebook"},A1))) 0

or this:
=SUM(COUNTIF(A1,"*"&{"Laptop","VPN","notebook"}&"* "))0



" wrote:
Hi,
I have the following items in COL_A:


COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS


What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.


The result should look like this:


COL_A * * * *COL_B
------- * * *-------
Mike B * * * FALSE
GX270 * * * *FALSE
Notebook X * TRUE
LunchRoom * *FALSE
New Printer *FALSE
John VPN * * TRUE
Spare Laptop TRUE
Susan WS * * FALSE


I've been trying a VLOOKUP() function but it doesn't work as
expected. *The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.


Thanks for your suggestions.- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Searching for strings in a column

You're Welcome!

" wrote:

Wow, I love this one :) Thanks.

On Jan 23, 10:06 am, Teethless mama
wrote:
Try this:
=SUMPRODUCT(--ISNUMBER(SEARCH({"Laptop","VPN","notebook"},A1))) 0

or this:
=SUM(COUNTIF(A1,"*"&{"Laptop","VPN","notebook"}&"* "))0



" wrote:
Hi,
I have the following items in COL_A:


COL_A
-------
Mike B
GX270
Notebook X
LunchRoom
New Printer
John VPN
Spare Laptop
Susan WS


What I'd like to do, is to set COL_B to "TRUE" when COL_A contains:
"notebook" or "VPN" or "Laptop", in a non case-sensitive context.


The result should look like this:


COL_A COL_B
------- -------
Mike B FALSE
GX270 FALSE
Notebook X TRUE
LunchRoom FALSE
New Printer FALSE
John VPN TRUE
Spare Laptop TRUE
Susan WS FALSE


I've been trying a VLOOKUP() function but it doesn't work as
expected. The MATCH() funciton works but makes a very complicated
formula and I'll have to add exceptions to my list so, putting
"Laptop", "VPN", "notebook" and so on in a seperate worksheet makes
sense.


Thanks for your suggestions.- Hide quoted text -


- Show quoted text -



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
Is there a formula for searching for any one of a list of strings? bookgirl Excel Worksheet Functions 8 December 1st 06 06:55 PM
vba searching for strings in multiple worksheets [email protected] Excel Discussion (Misc queries) 2 July 26th 06 07:15 PM
Searching for codes in text strings Bhupinder Rayat Excel Worksheet Functions 9 April 27th 06 01:20 PM
searching for multiple text strings eddie Excel Discussion (Misc queries) 4 April 10th 05 10:15 PM
Searching for Substrings Within Strings Tiziano Excel Discussion (Misc queries) 8 January 6th 05 03:09 AM


All times are GMT +1. The time now is 06:39 AM.

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"