LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Lottery Analysis

For the fellow who wanted this, I will try to spell it out.

Sheet "weekly numbers" contains the weekly lottery results
with column A being the week, and columns B thru G having
the six numbers. Row 3 has headings, and the data starts
in row 5. This data set must be sorted with most recent
week at top (row 5).

Sheet "analysis" is set up this way:

cell A1 has a count of the total number of weeks of
results.

cell B1 contains input - the last N weeks you want to
search for counting occurances - I used 5.

cells B5:B54 contain the individual numbers to search for -
I used 1 thru 50.

cell C5 contains the following formula.

=COUNTIF('weekly numbers'!$B$5:OFFSET('weekly numbers'!
$B$4,analysis!$B$1,COUNTA('weekly numbers'!$B$3:$H$3)-
1,1,1),$B5)

copy this down thru row 54

the counta function could be replaced with the value 6 if
you want to fix the number of weekly numbers (the number
of lottery numbers), or you could just simply define the
countif range.

cell E5 contains the following formula

=IF(ISNA(MATCH($B5,'weekly numbers'!B$5:OFFSET('weekly
numbers'!B$4,analysis!$A$1+1,0,1,1),0)),"",MATCH
($B5,'weekly numbers'!B$5:OFFSET('weekly numbers'!
B$4,analysis!$A$1+1,0,1,1),0))

copy this down thru row 54 and out thru column J to look
at all six columns of all 50 numbers.

cell C5 contains the following formula

=IF(MIN(E5:I5)=0,"",MIN(E5:J5))

copy this down thru row 54

the result will be column B having the number of hits of
all the numbers in the last N weeks (N being the value in
cell B1), and column C having the number of weeks since
the last occurance of each number.

My workbook seems to work fine.






 
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
Lottery... Jake[_6_] Excel Discussion (Misc queries) 8 May 31st 11 07:35 PM
Excel 2002 Analysis ToolPak Regression Analysis Help Requested MH Excel Worksheet Functions 1 February 28th 09 07:16 AM
Analysis Toolpak-Confidence Level and data analysis questions MH Excel Worksheet Functions 0 January 3rd 09 06:15 PM
Lottery smason Excel Discussion (Misc queries) 13 August 21st 08 11:45 PM
Analysis ToolPak installed but no Data Analysis option Eric Stephens Excel Discussion (Misc queries) 3 February 2nd 05 09:17 PM


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