PC Review


Reply
Thread Tools Rate Thread

compare multiple values in one cell to a range of values in multiplecells?

 
 
hfx.selling
Guest
Posts: n/a
 
      1st Nov 2008
x-no-archive: yes

I have a set of data comprised of user IDs separated by a space
(output from a logging application): A sample cell might contain the
following value (only a space between the values):

Test.Guy Sample.User Admin

I also have a range containing a subset of the possible values (user
names), each in their own set of cells, such as:
Test.Guy
Sample.user

I would like to craft a formula that counts the number of users from
the list that appear in the cells. So ideally, I would have a cell
that reports "Number of OUR users" as 2 for the above example, as two
of the three values are in my range of user IDs.

Does anyone have any suggestions on how to accomplish this?
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      1st Nov 2008
Say A1 contains:
alpha beta gamma delta zeta eta theta
all in one cell and that B8 thru B13 contain:

beta
zeta
alpha
cat
dog
flower

In C8 enter:
=IF(LEN(A$1)=LEN(SUBSTITUTE($A$1,B8,"")),0,1) and copy down

We see in B8 thru C13:

beta 1
zeta 1
alpha 1
cat 0
dog 0
flower 0

so:
=SUM(C8:C13) will give the number of items in the list that appear un the
single cell.
--
Gary''s Student - gsnu200811


"hfx.selling" wrote:

> x-no-archive: yes
>
> I have a set of data comprised of user IDs separated by a space
> (output from a logging application): A sample cell might contain the
> following value (only a space between the values):
>
> Test.Guy Sample.User Admin
>
> I also have a range containing a subset of the possible values (user
> names), each in their own set of cells, such as:
> Test.Guy
> Sample.user
>
> I would like to craft a formula that counts the number of users from
> the list that appear in the cells. So ideally, I would have a cell
> that reports "Number of OUR users" as 2 for the above example, as two
> of the three values are in my range of user IDs.
>
> Does anyone have any suggestions on how to accomplish this?
>

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      1st Nov 2008
One way...

A1 = Test.Guy Sample.User Admin

D12 = Test.Guy, Sample.user

=SUMPRODUCT(--(ISNUMBER(SEARCH(D12,A1))))


--
Biff
Microsoft Excel MVP


"hfx.selling" <(E-Mail Removed)> wrote in message
news:8d5d6def-512e-430c-b50e-(E-Mail Removed)...
>
> I have a set of data comprised of user IDs separated by a space
> (output from a logging application): A sample cell might contain the
> following value (only a space between the values):
>
> Test.Guy Sample.User Admin
>
> I also have a range containing a subset of the possible values (user
> names), each in their own set of cells, such as:
> Test.Guy
> Sample.user
>
> I would like to craft a formula that counts the number of users from
> the list that appear in the cells. So ideally, I would have a cell
> that reports "Number of OUR users" as 2 for the above example, as two
> of the three values are in my range of user IDs.
>
> Does anyone have any suggestions on how to accomplish this?



 
Reply With Quote
 
hfx.selling
Guest
Posts: n/a
 
      1st Nov 2008
x-no-archive: yes

Awesome, that worked perfectly. I was going to do something similar to
the option Gary's student proposed, but this formula worked like a
charm. I should've mentioned that there's hundreds and hundreds of
those 'data' cells to check, so this option is certainly preferable.

Thanks so much - my Monday morning is saved! :-)

On Nov 1, 1:43*pm, "T. Valko" <biffinp...@comcast.net> wrote:
> One way...
>
> A1 = Test.Guy Sample.User Admin
>
> D12 = Test.Guy, Sample.user
>
> =SUMPRODUCT(--(ISNUMBER(SEARCH(D12,A1))))
>
> --
> Biff
> Microsoft Excel MVP
>
> "hfx.selling" <hfx.n...@gmail.com> wrote in message
>
> news:8d5d6def-512e-430c-b50e-(E-Mail Removed)...
>
>
>
> > I have a set of data comprised of user IDs separated by a space
> > (output from a logging application): A sample cell might contain the
> > following value (only a space between the values):

>
> > Test.Guy Sample.User Admin

>
> > I also have a range containing a subset of the possible values (user
> > names), each in their own set of cells, such as:
> > Test.Guy
> > Sample.user

>
> > I would like to craft a formula that counts the number of users from
> > the list that appear in the cells. So ideally, I would have a cell
> > that reports "Number of OUR users" as 2 for the above example, as two
> > of the three values are in my range of user IDs.

>
> > Does anyone have any suggestions on how to accomplish this?


 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      1st Nov 2008
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"hfx.selling" <(E-Mail Removed)> wrote in message
news:1492ecef-d7dd-4b75-90c0-(E-Mail Removed)...

Awesome, that worked perfectly. I was going to do something similar to
the option Gary's student proposed, but this formula worked like a
charm. I should've mentioned that there's hundreds and hundreds of
those 'data' cells to check, so this option is certainly preferable.

Thanks so much - my Monday morning is saved! :-)

On Nov 1, 1:43 pm, "T. Valko" <biffinp...@comcast.net> wrote:
> One way...
>
> A1 = Test.Guy Sample.User Admin
>
> D12 = Test.Guy, Sample.user
>
> =SUMPRODUCT(--(ISNUMBER(SEARCH(D12,A1))))
>
> --
> Biff
> Microsoft Excel MVP
>
> "hfx.selling" <hfx.n...@gmail.com> wrote in message
>
> news:8d5d6def-512e-430c-b50e-(E-Mail Removed)...
>
>
>
> > I have a set of data comprised of user IDs separated by a space
> > (output from a logging application): A sample cell might contain the
> > following value (only a space between the values):

>
> > Test.Guy Sample.User Admin

>
> > I also have a range containing a subset of the possible values (user
> > names), each in their own set of cells, such as:
> > Test.Guy
> > Sample.user

>
> > I would like to craft a formula that counts the number of users from
> > the list that appear in the cells. So ideally, I would have a cell
> > that reports "Number of OUR users" as 2 for the above example, as two
> > of the three values are in my range of user IDs.

>
> > Does anyone have any suggestions on how to accomplish this?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro that will add multiple emails based on a range of cell values Tysone Microsoft Excel Programming 2 27th May 2008 04:52 PM
Macro that will add multiple emails based on a range of cell values Tyson Microsoft Excel Discussion 5 26th May 2008 10:11 PM
How to compare multiple cell values =?Utf-8?B?Q2hpcnM=?= Microsoft Excel Programming 3 10th Jun 2005 02:03 PM
Search/Filter to find values in another range based on two cell values Andy Microsoft Excel Misc 1 30th Apr 2004 12:24 AM
Search/Filter to find values in another range based on two cell values Andy Microsoft Excel Programming 2 29th Apr 2004 04:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:37 PM.