Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Adding the contents of "x" number of cells.

So I have a column of randomly created numbers that I need to use for
financial predictions. I need to be able to say: Add from the first cell to
the "x" number of cells.

i.e:
A
Random numbers: Project for: 3
1 3435
2 4234
3 4467
4 2321
5 1234 Then it will add, A1, A2, A(x), where x is 3

I hope I'm clear enough.
I will greatly appreciate your help.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,510
Default Adding the contents of "x" number of cells.

Assume that the values to be summed start in cell A1 and the 3 is in cell C1
then you could use the following formula:-
=SUM(INDIRECT("A1:A"&C1))

In the above formula would be a replacement for the following:-
=SUM(A1:A3)

However, if the range to be summed starts on a row greater than 1 and you
still want to sum 3 rows then you would have to add a number to the value in
C1. Assume that the values to be summedstart at cell A10 then the formula
would be:-
=SUM(INDIRECT("A10:A"&C1+9))


--
Regards,

OssieMac


"Menochez" wrote:

So I have a column of randomly created numbers that I need to use for
financial predictions. I need to be able to say: Add from the first cell to
the "x" number of cells.

i.e:
A
Random numbers: Project for: 3
1 3435
2 4234
3 4467
4 2321
5 1234 Then it will add, A1, A2, A(x), where x is 3

I hope I'm clear enough.
I will greatly appreciate your help.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Adding the contents of "x" number of cells.

Another one:

C1 = 3

=SUM(A1:INDEX(A1:A100,C1))

If C1 is empty the formula will calculate the entire range.

--
Biff
Microsoft Excel MVP


"Menochez" wrote in message
...
So I have a column of randomly created numbers that I need to use for
financial predictions. I need to be able to say: Add from the first cell
to
the "x" number of cells.

i.e:
A
Random numbers: Project for: 3
1 3435
2 4234
3 4467
4 2321
5 1234 Then it will add, A1, A2, A(x), where x is 3

I hope I'm clear enough.
I will greatly appreciate your help.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Adding the contents of "x" number of cells.

Just another method. Assuming your list starts in A1, with C1 holding
the number of cells to Sum.

=SUM(OFFSET(A1,0,0,C1,1))

= = =
HTH :)
Dana DeLouis


Menochez wrote:
So I have a column of randomly created numbers that I need to use for
financial predictions. I need to be able to say: Add from the first cell to
the "x" number of cells.

i.e:
A
Random numbers: Project for: 3
1 3435
2 4234
3 4467
4 2321
5 1234 Then it will add, A1, A2, A(x), where x is 3

I hope I'm clear enough.
I will greatly appreciate your help.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Adding the contents of "x" number of cells.

Thank you! Works perfectly.

"OssieMac" wrote:

Assume that the values to be summed start in cell A1 and the 3 is in cell C1
then you could use the following formula:-
=SUM(INDIRECT("A1:A"&C1))

In the above formula would be a replacement for the following:-
=SUM(A1:A3)

However, if the range to be summed starts on a row greater than 1 and you
still want to sum 3 rows then you would have to add a number to the value in
C1. Assume that the values to be summedstart at cell A10 then the formula
would be:-
=SUM(INDIRECT("A10:A"&C1+9))


--
Regards,

OssieMac


"Menochez" wrote:

So I have a column of randomly created numbers that I need to use for
financial predictions. I need to be able to say: Add from the first cell to
the "x" number of cells.

i.e:
A
Random numbers: Project for: 3
1 3435
2 4234
3 4467
4 2321
5 1234 Then it will add, A1, A2, A(x), where x is 3

I hope I'm clear enough.
I will greatly appreciate your help.


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Do you want to replace the contents of the destination cells?" Bob Barnes Excel Discussion (Misc queries) 8 April 2nd 23 08:05 PM
Convert cell "contents" into a "comment" Ryan Excel Discussion (Misc queries) 4 October 3rd 08 11:34 PM
how to increase size of "name box" and "contents of cell " displa. Stubby- LIBERTY New Users to Excel 2 February 22nd 07 06:43 PM
Adding "0" as leading digits into cells in Excel Tippetue Excel Worksheet Functions 2 October 19th 06 12:14 AM
Adding more than 3 cells (2003)produces "0" but no error message garden girl Excel Worksheet Functions 4 August 30th 06 02:11 PM


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

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

About Us

"It's about Microsoft Excel"