Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calculate sum over power of a range of values in excel?

I have Several Numbers in A1 through A100. I have also a number stored in another cell, D1. Now I want to calculate

=sum(power(a1,d1), power(a2, d1), ....... power(a100,d1) ).

How can I do that in short form of excel function? I have come across sumsq function that can evaluate sum of square values in a range. But I want to generalize for power n, not just 2.

like image 862
run_time_error Avatar asked Feb 07 '23 23:02

run_time_error


1 Answers

Use the Array formula:

=SUM((A1:A100)^$D$1)

or

=SUM(POWER((A1:A100),$D$1))

Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key.

enter image description here

like image 163
Gary's Student Avatar answered Feb 15 '23 20:02

Gary's Student