Sum

B

Bob

Sorry if I've already asked this, having trouble finding old post.
I'm trying to write a program for column B so that every cell will be the
sum of the cells above it and the cell to the left of it, ie something like
=sum(B(n-1),An)
but it doesn't recognize n, and I don't even know if you can write a sum
function for an entire row.
Thanks,
Bob
 
J

John C

Assuming data starts in row 2, and summing data in column A.

In B2: =SUM(A$2:A2)

Then copy down as needed.

Hope this helps!
 
B

Bob

Could explain this briefly? where does the $ sign come in, and also I'm
looking to input a lot of data and not have to keep copying and changing the
number (ie A$3:A3, A$4:A4), can I apply this to the entire column?
Thanks for your help
Rob
 
R

RagDyeR

If you're starting with values in A1, in B1 enter:
=A1

In B2 enter:
=B1+A2

Then copy B2 down as needed.

OR, if you have less the 5,000 rows to tabulate, enter this formula in B1:

=Sum(A$1:A1)

And copy down as needed.
(The Sum() formula is very resource intensive)
--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

Sorry if I've already asked this, having trouble finding old post.
I'm trying to write a program for column B so that every cell will be the
sum of the cells above it and the cell to the left of it, ie something like
=sum(B(n-1),An)
but it doesn't recognize n, and I don't even know if you can write a sum
function for an entire row.
Thanks,
Bob
 
J

John C

The $ acts as an anchor, which means that the column letter or row number
after the dollar sign will not change. In this instance, if you copy the
formula down, and then look in the other cells, you will see different
formulas.
Cell B3: =SUM(A$2:A3)
Cell B4: =SUM(A$2:A4)
Cell B5: =SUM(A$2:A5)
and so forth.
The range in the SUM field is what will get added together so in B3, it will
sum A2 through A3, in B4, it will sum A2 through B4, etc.
Once you type the formula in cell B2, highlight the selection of B2 down to
as far as you need, then go to your menu selection and select
Edit-->Fill-->Down, and this will fill all your B column formulas in with the
proper ranges.
 
R

RagDyeR

Since you say that you intend to input "a lot" of data, heed my caveat
pertaining to the range size for this type of formula.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

Could explain this briefly? where does the $ sign come in, and also I'm
looking to input a lot of data and not have to keep copying and changing the
number (ie A$3:A3, A$4:A4), can I apply this to the entire column?
Thanks for your help
Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top