Help - Search - Members - Calendar
Full Version: How To Calculate Power Over A Range Of Consecutive Cells?
Suggest A Fix PC Support Forums > General Computing > Applications and Office Programs
Dino
Hello everyone,
I am trying to use Excel to calculate powers of 2 over consecutive cells; I used the following formulas:
1- =POWER(2,0)
=POWER(2,1)
=POWER(2,2)
=POWER(2,3)
And so on.
2- =(2)^0
=(2)^1
=(2)^2
=(2)^3
And so on.
3- In cell (A1), for example, I typed the number 2 then in row B I’d do the following in each cell:
(B1): =(A1)^0
(B2): =(A1)^1
(B3): =(A1)^2
(B4): =(A1)^3
And so on.
All of these methods are working fine, but the problem is that I can’t use them over a very long range of cell, say, from 1 to 300. I tried to highlight the first few cells where I have my formulas, go to the lower right corner of the last highlighted cell, and drag them from there, but all I am getting is a repetition of my previous calculations. The thing that I don’t understand is that when I put consecutive numbers in a range of consecutive cells, say, 1,2,3…, highlight and drag these cells, I end up getting sequential numbers increasing by an increment of 1 all the way until I stop dragging these cells, but this doesn’t seem to work when it comes to calculating powers of 2 or any other number for that mater.
I’m using Microsoft Office Excel 2003 SP3, and all the updates are there. I think that I’m going wrong somewhere along the line, but I don’t seem to find what the issue is; any help would be appreciated.
Dashwood95
I'm going to take a peek after work dino.
Dino
Thanks Dashie.
Dashwood95
Right now the only thing I actually thought of that would work for long periods would be to use column A as a base reference of the 1-300 variable numbers for the "exponent" portion of the formula. This might not be very feasible though it does work. If you want to show me some of the raw data you're using please feel free to.

Here's what I was getting at because so far I haven't found a way to make Excel understand you want a sequential "power".

With 1 being the value in A1 and 6 being the value in B1
CODE

1    6
2    36
3    216
4    1296
5    7776
6    46656
7    279936
8    1679616
9    10077696
10    60466176
11    362797056
12    2176782336
13    13060694016
14    78364164096
15    4.70185E+11


With 1 being the value in A1 and =POWER(6,A1) being the value in B1.
CODE

1    =POWER(6,A1)
=A1+1    =POWER(6,A2)
=A2+1    =POWER(6,A3)
=A3+1    =POWER(6,A4)
=A4+1    =POWER(6,A5)
=A5+1    =POWER(6,A6)
=A6+1    =POWER(6,A7)
=A7+1    =POWER(6,A8)
=A8+1    =POWER(6,A9)
=A9+1    =POWER(6,A10)
=A10+1    =POWER(6,A11)
=A11+1    =POWER(6,A12)
=A12+1    =POWER(6,A13)
=A13+1    =POWER(6,A14)
=A14+1    =POWER(6,A15)
Dashwood95
If you didn't want the variable exponents on your main page you could reference to a second sheet in the workbook as well. What's this for btw...if you can say.
Dino
Nothing in particular at the moment; I just use Excel a lot in my physics classes to do a lot of tedious calculations, and I was trying to see if I can calculate sequential powers. I’ll look at your code more closely and see if I can implement it to do what I need; thanks for your help though.
Dino
Your idea worked with a slight modification; what I did was to put 0,1,2,... in column A, and drag it all the way down to the desired range (say 300). In column B, I put the following in cells B1, B2, B3 respectively:
=POWER(2,A1)
=POWER(2,A2)
=POWER(2,A3)
Highlighting and dragging down these cells will give you sequential powers. Thanks again for your help Dashie.
Dashwood95
That's why I chose those because Excel understands A1,A2,A3 but for some reason not static exponents. I keep thinking there has to be a way but yet cannot fathom how.

You didn't think I manually retyped all those did ya? smile.gif
Dino
As you know, I’m not the sharpest tool in the shed; so yes, I had my doubts. laugh.gif laugh.gif laugh.gif
Dashwood95
I would never say or think that about you dino. You stop that!
Dino
That’s alright; I question my own sanity all the time. laugh.gif laugh.gif
ROCKFISHER
Hi lads,sorry to go off topic on this,but a much easier way of solving maths problems is to use MAPLE or MATHCAD.
Dino
That would be like using a Mack truck to move around instead of using a compact car, don’t you agree?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.