#1   Report Post  
Posted to microsoft.public.excel.misc
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Sum

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Sum

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!
--
John C


"Bob" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Sum

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

"John C" wrote:

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!
--
John C


"Bob" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Sum

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!
================================================== ===

"Bob" wrote in message
...
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


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Sum

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.
--
John C


"Bob" wrote:

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

"John C" wrote:

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!
--
John C


"Bob" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default Sum

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 !
-----------------------------------------------------------------------------------------------

"Bob" wrote in message
...
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

"John C" wrote:

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!
--
John C


"Bob" wrote:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"