Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Number Match Formula?

Hi all

I've got two sets of numbers:

a: 1 3 4 7 9 11 13 15 16 18 21 22 25 32 33 36 38 39 41 42 43 44 46 48
49 50
b: 2 3 5 8 9 10 13 16 17 18 20 21 29 30 31 32 35 39 40 45 48 49 50 52
54 55

How would I write a formula that would tell me how many numbers match
from each set? Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Number Match Formula?

On Jun 16, 8:15*am, JAgger1 wrote:
Hi all

I've got two sets of numbers:

a: 1 3 4 7 9 11 13 15 16 18 21 22 25 32 33 36 38 39 41 42 43 44 46 48
49 50
b: 2 3 5 8 9 10 13 16 17 18 20 21 29 30 31 32 35 39 40 45 48 49 50 52
54 55

How would I write a formula that would tell me how many numbers match
from each set? Thanks


Sorry, I should have said, how would I write a formula that would tell
me how many numbers from set B match numbers from set A.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 833
Default Number Match Formula?

On Jun 16, 1:18*pm, JAgger1 wrote:
On Jun 16, 8:15*am, JAgger1 wrote:

Hi all


I've got two sets of numbers:


a: 1 3 4 7 9 11 13 15 16 18 21 22 25 32 33 36 38 39 41 42 43 44 46 48
49 50
b: 2 3 5 8 9 10 13 16 17 18 20 21 29 30 31 32 35 39 40 45 48 49 50 52
54 55


How would I write a formula that would tell me how many numbers match
from each set? Thanks


Sorry, I should have said, how would I write a formula that would tell
me how many numbers from set B match numbers from set A.


EXCEL 2007
Assuming that the 2 sets of numbers that you have given are in 2
columns (A and B starting at row 1).

In cell C1 type:-
=IF(A1=B1,"yes","no")

Copy and paste the above formula down to and including cell C24.

In cell C25 type:-
=COUNTIF(C1:C24,"yes")

Answer in cell C25 is 4.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 230
Default Number Match Formula?

On 16/06/2011 15:08, trip_to_tokyo wrote:
On Jun 16, 1:18 pm, wrote:
On Jun 16, 8:15 am, wrote:

Hi all


I've got two sets of numbers:


a: 1 3 4 7 9 11 13 15 16 18 21 22 25 32 33 36 38 39 41 42 43 44 46 48
49 50
b: 2 3 5 8 9 10 13 16 17 18 20 21 29 30 31 32 35 39 40 45 48 49 50 52
54 55


How would I write a formula that would tell me how many numbers match
from each set? Thanks


Sorry, I should have said, how would I write a formula that would tell
me how many numbers from set B match numbers from set A.


EXCEL 2007
Assuming that the 2 sets of numbers that you have given are in 2
columns (A and B starting at row 1).

In cell C1 type:-
=IF(A1=B1,"yes","no")

Copy and paste the above formula down to and including cell C24.

In cell C25 type:-
=COUNTIF(C1:C24,"yes")

Answer in cell C25 is 4.


Looks to me by inspection that the right answer is 11.

And something like with the numbers in rows 1 & 3 starting column A
Use the match formula in row 5 and then count numeric answers
=MATCH(A3,$A1:$Z1,0)
=COUNTIF(A5:Z5,"0")

It does look a bit like homework too.

There might well be a cute way to do it with a single array formula.

Regards,
Martin Brown


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default Number Match Formula?

Sorry, my bad. I should have said how many numbers from set B occur in
Set A, not which numbers match in value and postion.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,059
Default Number Match Formula?

On Jun 16, 7:46*am, JAgger1 wrote:
Sorry, my bad. I should have said how many numbers from
set B occur in Set A, not which numbers match in value
and postion.


I'm sorry, but that is exactly what you said the first time -- well,
the second time ;-).

On Jun 16, 5:18 am, JAgger1 wrote:
Sorry, I should have said, how would I write a formula
that would tell me how many numbers from set B match
numbers from set A.


=SUMPRODUCT(--(COUNTIF(A1:A1000,B1:B30)0))

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
Lookup Formula: Return 1st match, then 2nd match, then 3rd match Scott Excel Discussion (Misc queries) 4 December 11th 09 05:50 AM
Formula to Increment a number upon a match in an adjacent cell Nolene Excel Worksheet Functions 9 October 2nd 09 10:04 PM
How can I match a random number with closest number from sequence? Matt Excel Worksheet Functions 4 August 3rd 06 01:22 AM
Compare/match positve number against negative number? Kobayashi[_56_] Excel Programming 2 November 19th 04 09:11 PM
Compare/match positve number against negative number? Kobayashi[_55_] Excel Programming 1 November 18th 04 02:47 PM


All times are GMT +1. The time now is 06:42 PM.

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

About Us

"It's about Microsoft Excel"