# Compounding Numbers Formula/loop/equation ?

Nov 26, 2009I am trying to make a loop to calculate the total costs for 12 days of costs. It has to compound sort of though. I need the total = cost for day 1(includes day 1) + cost for day 2(includes day 1 and 2) + cost for day 3(includes day 1, 2, and 3).....up to day 12. I have a for/next loop in my array, but it calculates the total for 12 days, but I need it to add as explained above. I have been strategizing and the program needs V= day 1 then add V to T. Then V needs to clear and then loop again so V=day 1 + day 2 then add V to T. Then V needs to clear and loop again so V=day 1 + day 2 + day 3 then add V to T and clear V.........up until all days are added together. If anyone has any suggestions or any idea of what I am talking about please comment! Here is the link to another forum that might explain the program in more detail:

Here is the code for my program so far: