I am trying to determine if it is possible to write the following calculation in Excel where n is variable and comes from user input. The value of n is positive and equal to or greater than 1. Is it possible to write a formula rather than using vba.
2^1 + 2^2 + 2^3 + ...... + 2^n
If n = 1 then the calculation would be 2^1
If n = 2 then the calculation would be 2^1 + 2^2
If n = 3 then the calculation would be 2^1 + 2^2 + 2^3
Is it possible to write a formula that works for any value of n
Thanks
Use SUMPRODUCT
=SUMPRODUCT(2^ROW(INDEX(A:A,1):INDEX(A:A,A1)))
Where A1 is the cell in which the user will put the desired number.
Try this formula :
=2^(A1+1)-2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With