# How can to calculate frequency

#### larbec

##### Member
I want to add up how many times a specific number is drawn. The value will change each draw. Is there a formula I can use to do this or a Macro to click on a button each time? I know about the countif function but I can not figure out how to make this work. I will enter the new draw number to B3:F3 each draw by inserting a new row. The numbers in blue are for B1 thru B4 and red is for the Bonus Ball. I have an X in columns H-R and that is where I would like the total count of ties the number has drawn (if possible but not a have to have) I will be counting all the numbers in B3:F3000, kind of like the frequency count

#### Icewynd

##### Member
Have a look at my Markov Chain workbook, Larbec. That is what it is doing:

Good Luck!

#### Cartref45

##### Member
Hi Larbec,

You might try this file, very simple.

You can either use the stats on the same sheet or go to Stats sheet, they will update as soon as you add a new result and will stay in the same place.

If you use the stats on the same sheet then you will have to move the tables up each time you introduce a new result.

All you need to do is to replace the 100 or so results I have used with the 3,000 or so you have.

https://www.mediafire.com/#m3l41zba3597v

Cartref45

#### Cartref45

##### Member

http://www.mediafire.com/view/elgs7g4fgbq35x8/2Step_for_Larbec.xlsx

Cartref45

#### larbec

##### Member
Thanks guys, I started to use this today and also checking out what you posted in the links.

=COUNTIF(INDIRECT("\$F3"&":\$F3000"),N2)

#### larbec

##### Member
Ice,

Where can I get a download in excel for the Mega Millions and Powerball to put in your spreadsheet. Everything I find is in draw order and form current to past

#### Icewynd

##### Member
larbec said:
Ice,

Where can I get a download in excel for the Mega Millions and Powerball to put in your spreadsheet. Everything I find is in draw order and form current to past

Hmmmm, not sure. Maybe try the MM or PB sites to see if they have .csv downlowads?

Also, with my spreadsheet, the order doesn't matter. You can put the last draw at the top if you wish. I just add the newest draw at the bottom to avoid having to insert a new row at the top. Just personal preference.

Good Luck!