0

I want to calculate x+x^2+x^3+x^4+.......+x^n or higher, where n=# of years. Also, I want to simply input the number of years and have the spreadsheet calculate the answer. for example, if n=8 years, then x+x^2+x^3+x^4+x^5+x^6+x^7+x^8 or if n=40 then x+x^2+x^3+x^4+x^5+x^6+x^7+x^8......x^40. I can use this, but it is cumbersome

=(1+B3)+POWER(1+B3,A8-1)+POWER(1+B3,A8-2)+POWER(1+B3,A8)

Is this possible?

1
  • Please straighten out your nomenclature.  You indicate that x is the highest exponent; so does this mean that you want x+x^2+x^3+...+x^x (e.g., 8+8^2+8^3+8^4+8^5+8^6+8^7+8^8)? And your Excel formula is crazy! Why are you using an expression for x?  Just to confuse us?  And why are the terms out of order? Please do not respond in comments; edit your question to fix it. Sep 1, 2017 at 5:04

1 Answer 1

0

You need to use an array formula for that:

=SUM(B1^ROW(INDIRECT("1:"&B2)))
As this is an array formula, press CTRL+SHIFT+ENTER after typing it, not just ENTER.

To see how it works, select the output cell, then press "evaluate formula" in "formulas" tab and press "evaluate".

enter image description here

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .