Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Use of ROW() in array formula

I want to increment a value used an array formula when it is copied to
the cell below it. In a non-array formula I'd use ROW(A1) but in the
following array formula it causes an error:

=SUM((OFFSET(RefIDs,0,0,1)<"P")*(OFFSET(Balances, 0,0,1)))

In case it isn't obvious, RefIDs and Balances are defined names that
each refer to a range.

Say this is entered in cell H9. When I copy it down to cell H10 I want
it to be:

=SUM((OFFSET(RefIDs,1,0,1)<"P")*(OFFSET(Balances, 1,0,1)))

Here is my attempt that doesn't work:

=SUM((OFFSET(RefIDs,ROW(A1)-1,0,1)<"P")*(OFFSET(Balances,ROW(A1)-1,0,1)))

Can anyone point me in the direction of the solution, please?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Use of ROW() in array formula

Your formula looks like it should be
=SumProduct(...
or maybe you want =SumIf(...
(not sure, but...)
--
sb
"onedaywhen" wrote in message
om...
I want to increment a value used an array formula when it is copied to
the cell below it. In a non-array formula I'd use ROW(A1) but in the
following array formula it causes an error:

=SUM((OFFSET(RefIDs,0,0,1)<"P")*(OFFSET(Balances, 0,0,1)))

In case it isn't obvious, RefIDs and Balances are defined names that
each refer to a range.

Say this is entered in cell H9. When I copy it down to cell H10 I want
it to be:

=SUM((OFFSET(RefIDs,1,0,1)<"P")*(OFFSET(Balances, 1,0,1)))

Here is my attempt that doesn't work:


=SUM((OFFSET(RefIDs,ROW(A1)-1,0,1)<"P")*(OFFSET(Balances,ROW(A1)-1,0,1)))

Can anyone point me in the direction of the solution, please?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Use of ROW() in array formula

Thanks, Steve.

I worked out that I could use ROWS rather than ROW i.e.

=SUM((OFFSET(RefIDs,ROWS(A$1:A1)-1,0,1)<"P")*(OFFSET(Balances,ROWS(A$1:A1)-1,0,1)))

"steve" wrote in message ...
Your formula looks like it should be
=SumProduct(...
or maybe you want =SumIf(...
(not sure, but...)
--
sb
"onedaywhen" wrote in message
om...
I want to increment a value used an array formula when it is copied to
the cell below it. In a non-array formula I'd use ROW(A1) but in the
following array formula it causes an error:

=SUM((OFFSET(RefIDs,0,0,1)<"P")*(OFFSET(Balances, 0,0,1)))

In case it isn't obvious, RefIDs and Balances are defined names that
each refer to a range.

Say this is entered in cell H9. When I copy it down to cell H10 I want
it to be:

=SUM((OFFSET(RefIDs,1,0,1)<"P")*(OFFSET(Balances, 1,0,1)))

Here is my attempt that doesn't work:


=SUM((OFFSET(RefIDs,ROW(A1)-1,0,1)<"P")*(OFFSET(Balances,ROW(A1)-1,0,1)))

Can anyone point me in the direction of the solution, please?

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
Array formula SUMIF with 2D sum_range array Rich_84 Excel Worksheet Functions 3 April 3rd 09 10:46 PM
Array formula: how to join 2 ranges together to form one array? Rich_84 Excel Worksheet Functions 2 April 1st 09 06:38 PM
Find specific value in array of array formula DzednConfsd Excel Worksheet Functions 2 January 13th 09 06:19 AM
meaning of : IF(Switch; Average(array A, array B); array A) DXAT Excel Worksheet Functions 1 October 24th 06 06:11 PM
Array Formula - using LEFT("text",4) in formula Andrew L via OfficeKB.com Excel Worksheet Functions 2 August 1st 05 02:36 PM


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