Can someone help me simulate the game of craps in Excel? Here's how the game works: There are two dice. If on the first roll you get a 7 or 11, you win. If on the first roll you get a 2,3, or 12 you lose. If you get a 4, 5, 6, 8, 9, or 10 on the first roll you get to play again. You play again until you roll the same number again (you win) or until you roll a 7 (you lose). In the far left column I have the two dice being rolled simulated. The next column over I have the result: Win, Lose, Keep Playing.


Here is the formula I put in my second cell down in the results:

=IF((C3<>"Keep Playing")*AND((B4=7)*OR(B4=11)),"Win",IF((C3<>"Keep Playing")*AND((B4=2)*OR(B4=3)*OR(B4=12)),"Lose",IF((C3="Keep Playing")*AND(B3=B4),"Win",IF((C3="Keep Playing")*AND(B4=7),"Lose","Keep Playing"))))

For some reason it is not working for a win or lose after a win or lose. I also can't figure out what I should put for it to reference all cells above up until a win/lose so that it can tell whether the same number has been rolled since the first "keep Playing" after a win/lose. I'm doing 25 replications so I can't just create one craps game that I just play over and over.

Anyone able to tell me how to correct this formula?