Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Adding rows based on no of rows specified from a given position

hi there.

how can i add the contents of the rows given the number of rows to add?

i.e.
a1 = 1
a2 = 2
a3 = 3
a4 = 4
a5 = 5

if b1 = no of rows to add = 3
then c1 = ? formula to sum up a1:a3 = 6

if b2 = no of rows to add = 2
then c2 = ? formula to sum up a4:a5 = 9

thanks very much.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Adding rows based on no of rows specified from a given position

You can do that like this in C1:

=SUM(INDIRECT("A1:A"&B1))

and this one in C2:

=SUM(INDIRECT("A"&B1+1&":A"&B1+B2))

Hope this helps.

Pete

"nanette" wrote in message
...
hi there.

how can i add the contents of the rows given the number of rows to add?

i.e.
a1 = 1
a2 = 2
a3 = 3
a4 = 4
a5 = 5

if b1 = no of rows to add = 3
then c1 = ? formula to sum up a1:a3 = 6

if b2 = no of rows to add = 2
then c2 = ? formula to sum up a4:a5 = 9

thanks very much.




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
Adding rows of data based on first column Dewaynep New Users to Excel 3 May 1st 08 02:52 PM
Insert new rows based on Data in other rows mg_sv_r Excel Worksheet Functions 5 November 21st 07 01:51 PM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Adding Rows offsets to working rows across two worksheets tom Setting up and Configuration of Excel 3 July 30th 06 07:54 PM
Adding a subset of rows of cells, SUM, based on Lookup DMB Excel Discussion (Misc queries) 1 January 8th 06 06:56 PM


All times are GMT +1. The time now is 05:08 AM.

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"