Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Copying non-contiguous formulas

I want to copy down formulas refering to ranges of 25 rows (e.g. sum rows
1-25, sum rows 26-50 etc.) but when I copy the formula down, it only adds one
to each reference, not 25 (even when I've supplied several correct formulas).
Are there any tricks for getting around this? I have to copy the formula down
100 times and don't really want to type each one.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 449
Default Copying non-contiguous formulas

Hi

Try
=SUM(INDIRECT("A"&INT((ROW()-1)*25)+1&":A"&INT(ROW()*25)))
Note: must start in row 1 as is.

HTH. Best wishes Harald

"Erin Dicks" wrote in message
...
I want to copy down formulas refering to ranges of 25 rows (e.g. sum rows
1-25, sum rows 26-50 etc.) but when I copy the formula down, it only adds
one
to each reference, not 25 (even when I've supplied several correct
formulas).
Are there any tricks for getting around this? I have to copy the formula
down
100 times and don't really want to type each one.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Copying non-contiguous formulas

B1: =SUM(INDIRECT("A"&(ROW()-1)*25+1&":A"&ROW()*25))
copy down as needed
This will sum A1:A25 in B1, A26:A50 in B2, etc....
If you were starting in B2, it would be
=SUM(INDIRECT("A"&(ROW()-2)*25+2&":A"&(ROW()-1)*25+1))
Then, for each lower row, subtract 1 more from each row() argument, and add
1 more at the end, so row 3 would be ROW()-3*25+3 and (ROW()-2)*25+2
etc.

Hope this helps.
--
** John C **

"Erin Dicks" wrote:

I want to copy down formulas refering to ranges of 25 rows (e.g. sum rows
1-25, sum rows 26-50 etc.) but when I copy the formula down, it only adds one
to each reference, not 25 (even when I've supplied several correct formulas).
Are there any tricks for getting around this? I have to copy the formula down
100 times and don't really want to type each one.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Copying non-contiguous formulas

Hi,

1. Assuming I summing A1:A25 in B25. You can enter the formula on say B25,
then highlight B25 down to B49 and then drag the fill handle. The formula
will repeat every 25 or so lines and refer to the appropriate range. But
they will be 25 rows apart. If you want them all together, select from row
25 down to the last formula. Press Ctrl+G, Special, Blanks. Press Ctrl+-
(control minus) and shift cells up.

2. You can use a formula approach with INDIRECT.


--
Thanks,
Shane Devenshire


"Erin Dicks" wrote:

I want to copy down formulas refering to ranges of 25 rows (e.g. sum rows
1-25, sum rows 26-50 etc.) but when I copy the formula down, it only adds one
to each reference, not 25 (even when I've supplied several correct formulas).
Are there any tricks for getting around this? I have to copy the formula down
100 times and don't really want to type each one.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 143
Default Copying non-contiguous formulas

I want to copy down formulas refering to ranges of 25 rows (e.g. sum
rows 1-25, sum rows 26-50 etc.) but when I copy the formula down, it
only adds one to each reference, not 25 (even when I've supplied
several correct formulas). Are there any tricks for getting around
this? I have to copy the formula down 100 times and don't really want
to type each one.



Here's one way.

If the data is in column A, put this in B1 and copy down:
=SUM(OFFSET($A$1,25*(ROW()-1),0,25,1))



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Copying non-contiguous formulas

One way

=SUM(INDEX($A$1:$A$10000,ROWS($A$1:A1)*25-24):INDEX($A$1:$A$1000,ROWS($A$1:A1)*25))

replace only this range $A$1:$A$10000 if
your data starts somewhere else



--


Regards,


Peo Sjoblom

"Erin Dicks" wrote in message
...
I want to copy down formulas refering to ranges of 25 rows (e.g. sum rows
1-25, sum rows 26-50 etc.) but when I copy the formula down, it only adds
one
to each reference, not 25 (even when I've supplied several correct
formulas).
Are there any tricks for getting around this? I have to copy the formula
down
100 times and don't really want to type each one.



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
Copying Formulas Mac Excel Discussion (Misc queries) 1 January 23rd 08 03:06 PM
copying formulas texbetty Excel Discussion (Misc queries) 7 June 15th 07 01:34 PM
Copying Formulas Mtabaruka Excel Discussion (Misc queries) 2 April 4th 07 04:08 PM
Copying Formulas Dan R. Excel Discussion (Misc queries) 3 January 11th 07 10:18 PM
Excel copy formulas using non contiguous range Paul Moles Excel Discussion (Misc queries) 4 March 11th 06 11:07 PM


All times are GMT +1. The time now is 01:51 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"