Looking for a SUMSQ( function, but with exponent.

bbrother

New Member
Joined
Nov 23, 2015
Messages
41
I know there must be an easy answer to this, but I can't think of it!

I have a column of cells containing integer numbers. I want to consider each number as if it were an exponent of 2, so I want the sum of all the cells in the column like sum(2^(A1:A22)).

For example: I have the numbers 1, 1, 2, 3 arranged in a column. I want a formula to calculate the sum of 2^1 + 2^1 + 2^2 + 2^3.

I suppose I could add another column with an intermediate calculation and just sum that up, but I was hoping there was an elegant solution.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
T202008a.xlsm
ABC
111
224
339
4416
5525
65555
7
1a
Cell Formulas
RangeFormula
B1:B5B1=A1^2
B6B6=SUM(B1:B5)
C6C6=SUMPRODUCT(A1:A5^2)
 
Upvote 0
Close, but that's the sum of the squares instead of the sum of the powers of 2. In your table above the formula in cell B1 should be =2^A1 instead of A1^2.

The sum of 2^1+2^2 + 2^3+2^4+2^5 = 62

I didn't know you could add operators to ranges - I think SUMPRODUCT(2^A1:A5) might do the trick.
 
Upvote 0
T202008a.xlsm
ABCDE
111
224
339
4416
5525
655556262
1a
Cell Formulas
RangeFormula
B1:B5B1=A1^2
B6B6=SUM(B1:B5)
C6C6=SUMPRODUCT(A1:A5^2)
D6D6=SUMPRODUCT(2^(A1:A5))
E6E6=SUMPRODUCT(2^({1;2;3;4;5}))
 
Upvote 0

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top