title: Is there a better way to store data in subsequent cells per iteration in Excel?
body: <p>I am working on a rock, paper, scissors project for fun and trying to find a way to store the outcomes of each game in subsequent cells without overwriting the previous events. Currently I've created a lookup function that returns a cell of "win"/"lose"/"tie and 3 columns win/lose/tie. When an event occurs, it references the returned cell and stores the event as 1 or 0 depending on if it happened or not. I have a total count to track (n) events/Total Count. 
  I've created another column as my Unique Key with a descending number list to 500 which would be 500 Total Events.</p>
  
  <p>Rock,Paper,Scissors End Result:
  <img src="https://i.stack.imgur.com/mhhHx.png" alt="Rock,Paper,Scissors End Result"></p>
  
  <p>Workaround:   </p>
  
  <pre><code>Win Column: IF({TotalCount}={UniqueKey},(IF({Outcome}="win",1,0),{Self-Reference})  
  Lose Column: IF({TotalCount}={UniqueKey},(IF({Outcome}="lose",1,0),{Self-Reference})  
  Tie Column: IF({TotalCount}={UniqueKey},(IF({Outcome}="tie",1,0),{Self-Reference})  
  </code></pre>
  
  <p>Back-end Database Creation:
  <img src="https://i.stack.imgur.com/nD8KN.png" alt="Back-end Database Creation"></p>
  
  <p>This allows the cell to only change if the Event Count = The Row which is identified by the Unique Key of Events. This in turn creates a binary True/False database of what occurred. (All cells are still changing but it is self referencing itself if the Event Number is different from the Unique Key)</p>
  
  <p>Is there a better way to do this either in VBA or not? Is there a way to increment without establishing an existing array of 0s? (Currently it you can only run 500 events because I've created the array stopping at 500 events but it would be cool to be able to increment per each event).</p>
  
  <p>*This is my first question!</p>