title: How to make a loop or "sum" formula in Microsoft Excel?
body: <p>Say that I gain +5 coins from every room I complete. What I'm trying to do is to make a formula in Excel that gets the total coins I've gotten from the first room to the 100th room. </p>
  
  <p>With C++, I guess it would be something like:</p>
  
  <pre><code>while (lastRoom &gt; 0)
  {
  totalCoins = lastRoom*5;
  lastRoom--;
  }
  </code></pre>
  
  <p>totalCoins, being an array so that you can just output the sum of the array. </p>
  
  <p>So if ever, how do you put this code in excel and get it to work? Or is there any other way to get the total coins? </p>