Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need help comparing 6 of 10 numbers

Hi Excel guru's. I need help. I am doing a fundraiser lottery.
People are to pick 10 numbers between 1 and 49, I am then going to
choose 6 random numbers. I need a way of checking the numbers with
the 10 they have picked. I would like to then have it display how
many numbers matched. If you could help me I would greatly appreciate
it.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,365
Default Need help comparing 6 of 10 numbers

Put the 6 numbers you pick in row 1, columns A-F

Start putting the chosen 10 numbers in rows starting at 3 (they go into A-J)
In K3 put this formula (it's all one formula)
=COUNTIF($A$1:$F$1,A3)+COUNTIF($A$1:$F$1,B3)+COUNT IF($A$1:$F$1,C3)+COUNTIF($A$1:$F$1,D3)+COUNTIF($A$ 1:$F$1,E3)+COUNTIF($A$1:$F$1,F3)+COUNTIF($A$1:$F$1 ,G3)+COUNTIF($A$1:$F$1,H3)+COUNTIF($A$1:$F$1,I3)+C OUNTIF($A$1:$F$1,J3)

It will give you the count of the number of matches on the player's row with
the 6 numbers you have in row 1. You could put everyone's numbers in rows on
down the sheet and extend the formula down to check them all.

If you want to put person's name in column A (starting at row 3) and then
follow with the 10 numbers they pick, then those numbers would go into B-K,
and the counting formula would go into L and would look like this:

=COUNTIF($A$1:$F$1,B3)+COUNTIF($A$1:$F$1,C3)+COUNT IF($A$1:$F$1,D3)+COUNTIF($A$1:$F$1,E3)+COUNTIF($A$ 1:$F$1,F3)+COUNTIF($A$1:$F$1,G3)+COUNTIF($A$1:$F$1 ,H3)+COUNTIF($A$1:$F$1,I3)+COUNTIF($A$1:$F$1,J3)+C OUNTIF($A$1:$F$1,K3)

The numbers don't even have to be in sequence on any of the rows.

" wrote:

Hi Excel guru's. I need help. I am doing a fundraiser lottery.
People are to pick 10 numbers between 1 and 49, I am then going to
choose 6 random numbers. I need a way of checking the numbers with
the 10 they have picked. I would like to then have it display how
many numbers matched. If you could help me I would greatly appreciate
it.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Need help comparing 6 of 10 numbers

On Mar 6, 5:51 pm, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
Put the 6 numbers you pick in row 1, columns A-F

Start putting the chosen 10 numbers in rows starting at 3 (they go into A-J)
In K3 put this formula (it's all one formula)
=COUNTIF($A$1:$F$1,A3)+COUNTIF($A$1:$F$1,B3)+COUNT IF($A$1:$F$1,C3)+COUNTIF($A$1:$F$1,D3)+COUNTIF($A$ 1:$F$1,E3)+COUNTIF($A$1:$F$1,F3)+COUNTIF($A$1:$F$1 ,G3)+COUNTIF($A$1:$F$1,H3)+COUNTIF($A$1:$F$1,I3)+C OUNTIF($A$1:$F$1,J3)

It will give you the count of the number of matches on the player's row with
the 6 numbers you have in row 1. You could put everyone's numbers in rows on
down the sheet and extend the formula down to check them all.

If you want to put person's name in column A (starting at row 3) and then
follow with the 10 numbers they pick, then those numbers would go into B-K,
and the counting formula would go into L and would look like this:

=COUNTIF($A$1:$F$1,B3)+COUNTIF($A$1:$F$1,C3)+COUNT IF($A$1:$F$1,D3)+COUNTIF($A$1:$F$1,E3)+COUNTIF($A$ 1:$F$1,F3)+COUNTIF($A$1:$F$1,G3)+COUNTIF($A$1:$F$1 ,H3)+COUNTIF($A$1:$F$1,I3)+COUNTIF($A$1:$F$1,J3)+C OUNTIF($A$1:$F$1,K3)

The numbers don't even have to be in sequence on any of the rows.

" wrote:
Hi Excel guru's. I need help. I am doing a fundraiser lottery.
People are to pick 10 numbers between 1 and 49, I am then going to
choose 6 random numbers. I need a way of checking the numbers with
the 10 they have picked. I would like to then have it display how
many numbers matched. If you could help me I would greatly appreciate
it.




Thank you..That worked great.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Need help comparing 6 of 10 numbers

Hello,

Array enter (enter with CTRL + SHIFT + ENTER, not just ENTER):
=SUM(--ISNUMBER(MATCH(A1:F1,A3:J3,)))

Regards,
Bernd

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
Comparing 3 numbers [email protected] Excel Discussion (Misc queries) 10 May 18th 09 10:10 PM
Comparing two columns of numbers PaladinWhite Excel Worksheet Functions 2 June 1st 08 11:46 PM
comparing numbers in a sheet Rockbear Excel Discussion (Misc queries) 1 April 15th 08 06:16 PM
Comparing numbers/figures Lona M. Excel Worksheet Functions 1 December 19th 07 02:24 PM
comparing 2 columns of numbers Gary Keramidas Excel Programming 2 October 20th 06 07:17 PM


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