ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How Do I Find Different Values In A String? (https://www.excelbanter.com/excel-worksheet-functions/447991-how-do-i-find-different-values-string.html)

tb

How Do I Find Different Values In A String?
 
I have some part numbers in a string format in column A.
I want to know which ones include the sub-strings "VI", "EP", "PAR",
"BU".

Luckily, only one of these four values can be in each part number.
There are no instances where a part number has two, three, or all four
of the above sub-strings.

So I wrote the following formula:

=find(or("VI","EP","PAR"),a2)

....but it does not work! What do I need to do to make it work?

--
tb

Claus Busch

How Do I Find Different Values In A String?
 
Hi,

Am Tue, 15 Jan 2013 17:42:21 +0000 (UTC) schrieb tb:

I have some part numbers in a string format in column A.
I want to know which ones include the sub-strings "VI", "EP", "PAR",
"BU".

Luckily, only one of these four values can be in each part number.
There are no instances where a part number has two, three, or all four
of the above sub-strings.


try:
=COUNT(SEARCH({"VI","EP","PAR","BU"},A2))


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

tb

How Do I Find Different Values In A String?
 
On 1/15/2013 at 11:47:23 AM Claus Busch wrote:

Hi,

Am Tue, 15 Jan 2013 17:42:21 +0000 (UTC) schrieb tb:

I have some part numbers in a string format in column A.
I want to know which ones include the sub-strings "VI", "EP", "PAR",
"BU".

Luckily, only one of these four values can be in each part number.
There are no instances where a part number has two, three, or all
four of the above sub-strings.


try:
=COUNT(SEARCH({"VI","EP","PAR","BU"},A2))


Regards
Claus Busch


Works great! Thanks.
--
tb


All times are GMT +1. The time now is 05:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com