#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default matching two values

it is avery simple qeustion for most of you I know. But I could not figure it
out. I have got VCE students who prefered 6 subjects from 15 subjects on the
preference list. And all I want to know is intersection of these subjects.
i.e. how many times say, Physics have been preferred with Economics
concurrently.
--
VCE teacher
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default matching two values

Suppose the 6 subject preferences are listed in cols B to G, from row2 down

Put in H2:
=SUMPRODUCT(COUNTIF(B2:G2,{"Physics","Economics"}) )=2
Copy down all the way. Then you could apply autofilter on col H, filter for
TRUE

And if you need the count of cases,
Put in I1: =COUNTIF(H:H,TRUE)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"denizcan" wrote:
it is a very simple qeustion for most of you I know. But I could not figure it
out. I have got VCE students who prefered 6 subjects from 15 subjects on the
preference list. And all I want to know is intersection of these subjects.
i.e. how many times say, Physics have been preferred with Economics
concurrently.
--
VCE teacher

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default matching two values

Thanks Max. I tried your suggestion, however it did not work but gave me a
different idea. and I found a very simple answer! Thanks again..

=sumproduct(a2:a40,b2:b40)

as I put 1 for preference and 0 for not choosing that subject, if both
subjects were chosen it gave me product of 1 otherwise 0. was not it simple
and sweet?
--
VCE teacher


"Max" wrote:

Suppose the 6 subject preferences are listed in cols B to G, from row2 down

Put in H2:
=SUMPRODUCT(COUNTIF(B2:G2,{"Physics","Economics"}) )=2
Copy down all the way. Then you could apply autofilter on col H, filter for
TRUE

And if you need the count of cases,
Put in I1: =COUNTIF(H:H,TRUE)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"denizcan" wrote:
it is a very simple qeustion for most of you I know. But I could not figure it
out. I have got VCE students who prefered 6 subjects from 15 subjects on the
preference list. And all I want to know is intersection of these subjects.
i.e. how many times say, Physics have been preferred with Economics
concurrently.
--
VCE teacher

  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default matching two values

Glad you adapted it to suit.
Thanks for posting back
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"denizcan" wrote in message
...
Thanks Max. I tried your suggestion, however it did not work but gave me a
different idea. and I found a very simple answer! Thanks again..

=sumproduct(a2:a40,b2:b40)

as I put 1 for preference and 0 for not choosing that subject, if both
subjects were chosen it gave me product of 1 otherwise 0. was not it
simple
and sweet?
--
VCE teacher



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
Matching Values Plexed Excel Discussion (Misc queries) 1 July 6th 07 09:00 AM
matching values [email protected] Excel Worksheet Functions 4 March 14th 07 01:28 PM
Matching Values shryockp Excel Worksheet Functions 1 July 26th 06 06:04 PM
matching values italiavb Excel Worksheet Functions 3 June 15th 06 11:34 AM
Matching numeric values. mohd21uk via OfficeKB.com Excel Discussion (Misc queries) 1 May 17th 06 02:40 PM


All times are GMT +1. The time now is 08:12 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"