Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 117
Default specify an ending row in an array formula

I use the following formula to sum every other row up to row 500.
=SUMPRODUCT((MOD(ROW(A1:A500),2)=0)*A1:A500)
However, periodically rows within that range are inserted or deleted.
How can make the formula dynamic to specify the last row of the array to be
the row just above the formula.
Example:
If the formula is in row 600 then SUMPRODUCT...A1:A599
but if the fomula ends up in row 550 then SUMPRODUCT...A1:A549
Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default specify an ending row in an array formula

Try

=SUMPRODUCT((MOD(ROW(A$1:INDIRECT("A"&ROW()-1)),2)=0)*A$1:INDIRECT("A"&ROW()-1))

"Bassman62" wrote:

I use the following formula to sum every other row up to row 500.
=SUMPRODUCT((MOD(ROW(A1:A500),2)=0)*A1:A500)
However, periodically rows within that range are inserted or deleted.
How can make the formula dynamic to specify the last row of the array to be
the row just above the formula.
Example:
If the formula is in row 600 then SUMPRODUCT...A1:A599
but if the fomula ends up in row 550 then SUMPRODUCT...A1:A549
Thank you.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 117
Default specify an ending row in an array formula

Thank you!
Works wonderfully.

"Sheeloo" wrote:

Try

=SUMPRODUCT((MOD(ROW(A$1:INDIRECT("A"&ROW()-1)),2)=0)*A$1:INDIRECT("A"&ROW()-1))

"Bassman62" wrote:

I use the following formula to sum every other row up to row 500.
=SUMPRODUCT((MOD(ROW(A1:A500),2)=0)*A1:A500)
However, periodically rows within that range are inserted or deleted.
How can make the formula dynamic to specify the last row of the array to be
the row just above the formula.
Example:
If the formula is in row 600 then SUMPRODUCT...A1:A599
but if the fomula ends up in row 550 then SUMPRODUCT...A1:A549
Thank you.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default specify an ending row in an array formula

Hi,

You can simply convert the range to a list. Doing so will expand the range
automatically as and when you add more data in rows

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Bassman62" wrote in message
...
I use the following formula to sum every other row up to row 500.
=SUMPRODUCT((MOD(ROW(A1:A500),2)=0)*A1:A500)
However, periodically rows within that range are inserted or deleted.
How can make the formula dynamic to specify the last row of the array to
be
the row just above the formula.
Example:
If the formula is in row 600 then SUMPRODUCT...A1:A599
but if the fomula ends up in row 550 then SUMPRODUCT...A1:A549
Thank you.

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
formula ending with a letter Cynthia Excel Worksheet Functions 3 July 7th 08 11:13 PM
Ending another applicatoni Brettjg Excel Discussion (Misc queries) 0 March 3rd 08 12:01 AM
Week Ending formula cindi Excel Discussion (Misc queries) 2 July 11th 07 09:03 PM
Need Help Ending a Nested Formula Please TKGerdie Excel Discussion (Misc queries) 6 January 27th 06 07:32 PM
Ending zero RAB Excel Discussion (Misc queries) 3 August 25th 05 06:09 PM


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