Excel formula help for repeat , +1 , +2 and -1 , -2.

serge

Member
Hi,

I'm looking for someone to help me with thoses formulas, thank you ?

My data are for 5/56 and from C1 to G1 going down.

1) I need formulas that will return the repeat numbers from only the previous combination draw but NOT FROM THE POSITION OF THE NUMBER ,I need to have 1 formula per number repeated.

Ex : The first formula would look for the 1st repeated number in the previous draw.

The second formula would look for the 2nd repeated number in the previous draw ...Etc...



Ex : if the draws are :

previous : 5 - 34 - 38 - 51 - 56

New : 4 - 21 - 34 - 53 - 56



The first formula would return the number : 34

The second formula would return the number : 56

The third formula would return the number : 0

The fourth formula would return the number : 0

The fifth formula would return the number : 0


2 ) Same thing pretty much but those formulas would look for the number (+1 ).

Ex : if the draws are :

previous : 2 - 15 - 27 - 53 - 55

New : 16 - 21 - 40 - 54 - 56


The first formula would return the number : 16

The second formula would return the number : 54

The third formula would return the number : 56

The fourth formula would return the number : 0

The fifth formula would return the number : 0





3 ) Same thing but those formulas would look for the number ( +2 ).

4 ) Those formulas would look for the number ( -1 ).

5 ) And to finish those formulas would look for the number ( -2 ).



Thank you in advance for your help Serge.
 

Icewynd

Member
Hey Serge,

Sorry I can't help with your question :dunce:, but I'm wondering if you ever figured it out or got the answer elsewhere? This sounds like information worth knowing.
 

time*treat

Member
Asking for a macro rather than a formula would have yielded an answer long ago. Formulas are relatively limited in what they can do.
 

serge

Member
Hi, yes I got it for some time now but didn't got back on the forum.
If you are interested here the formulas.

With my draw number starting in C8,D8,E8,F8 AND G8 (5/56 )
for the repeat of the previous draw put this formula in I9 and drag it right and then down.

Formula : =(IF(COUNTIF($C8:$G8,C9)=1,C9," "))

For (+1) : =(IF(COUNTIF($C8:$G8,C9-1)=1,C9," "))

For (+2) : =(IF(COUNTIF($C8:$G8,C9-2)=1,C9," "))

For (-1) : =(IF(COUNTIF($C8:$G8,C9+1)=1,C9," "))
and
For (-2) : =(IF(COUNTIF($C8:$G8,C9+2)=1,C9," "))

Hope it help if you have the need for it ?
 

Sidebar

Top