Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Array Formula Syntax question...

Hello,

I wrote the following formula:
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",I F(INDIRECT(B5&"!$E$2:$E$500")="UNRATED",INDIRECT(B 5&"!$C$2:$C$500"))))}


The above formula works very well however, I'd like to change the "CURRENT"
parameter to an comparison operator range like: 1<x30

How should the syntax work?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Array Formula Syntax question...

Assuming you mean 1<x<30, we can multiply true/false checks to generate a
single output (note that this is still an array formula):

=COUNT(IF((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIREC T(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$50 0")="UNRATED"),INDIRECT(B5&"!$C$2:$C$500")))

Non-array version:
=SUMPRODUCT((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIR ECT(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$ 500")="UNRATED")*ISNUMBER(B5&"!$C$2:$C$500"))

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Steve P" wrote:

Hello,

I wrote the following formula:
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",I F(INDIRECT(B5&"!$E$2:$E$500")="UNRATED",INDIRECT(B 5&"!$C$2:$C$500"))))}


The above formula works very well however, I'd like to change the "CURRENT"
parameter to an comparison operator range like: 1<x30

How should the syntax work?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 19
Default Array Formula Syntax question...

Thanks Luke, but I'm still getting an error message.

Should there be another coma in the formula?

"Luke M" wrote:

Assuming you mean 1<x<30, we can multiply true/false checks to generate a
single output (note that this is still an array formula):

=COUNT(IF((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIREC T(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$50 0")="UNRATED"),INDIRECT(B5&"!$C$2:$C$500")))

Non-array version:
=SUMPRODUCT((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIR ECT(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$ 500")="UNRATED")*ISNUMBER(B5&"!$C$2:$C$500"))

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Steve P" wrote:

Hello,

I wrote the following formula:
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",I F(INDIRECT(B5&"!$E$2:$E$500")="UNRATED",INDIRECT(B 5&"!$C$2:$C$500"))))}


The above formula works very well however, I'd like to change the "CURRENT"
parameter to an comparison operator range like: 1<x30

How should the syntax work?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Array Formula Syntax question...

I'm still getting an error message.

What kind of error message? What does it say?

Luke's COUNT formula works OK for me.

The SUMPRODUCT formula is missing the INDIRECT function in the ISNUMBER
array. Add INDIRECT and it also works.

=SUMPRODUCT((INDIRECT(B5&"!D2:D500")1)*(INDIRECT( B5&"!D2:D500")<30)*(INDIRECT(B5&"!E2:E500")="UNRAT ED")*ISNUMBER(INDIRECT(B5&"!C2:C500")))

Tip: When using the INDIRECT function, *quoted cell references* are
evaluated as TEXT strings and will *never* change if the formula is copied.
The cell refs will *always* remain constant and in essence they are already
evaluated as being absolute references. So, you don't need to include the $
in the reference.


--
Biff
Microsoft Excel MVP


"Steve P" wrote in message
...
Thanks Luke, but I'm still getting an error message.

Should there be another coma in the formula?

"Luke M" wrote:

Assuming you mean 1<x<30, we can multiply true/false checks to generate a
single output (note that this is still an array formula):

=COUNT(IF((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIREC T(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$50 0")="UNRATED"),INDIRECT(B5&"!$C$2:$C$500")))

Non-array version:
=SUMPRODUCT((INDIRECT(B5&"!$D$2:$D$500")1)*(INDIR ECT(B5&"!$D$2:$D$500")<30)*(INDIRECT(B5&"!$E$2:$E$ 500")="UNRATED")*ISNUMBER(B5&"!$C$2:$C$500"))

--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Steve P" wrote:

Hello,

I wrote the following formula:
{=COUNT(IF(INDIRECT(B5&"!$D$2:$D$500")="CURRENT",I F(INDIRECT(B5&"!$E$2:$E$500")="UNRATED",INDIRECT(B 5&"!$C$2:$C$500"))))}


The above formula works very well however, I'd like to change the
"CURRENT"
parameter to an comparison operator range like: 1<x30

How should the syntax work?



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
VBA syntax help: ReDim Preserve an array Dave Excel Discussion (Misc queries) 4 September 8th 07 07:37 PM
unable to solve array formula syntax Green Fox Excel Worksheet Functions 2 September 6th 07 02:24 PM
Simplify syntax of a Sum(IF... Array JustMe602 Excel Worksheet Functions 4 October 7th 05 05:49 AM
syntax to refer to a range as an array? david cassain Excel Worksheet Functions 12 May 26th 05 11:28 PM
Want to Use an Array; Not Sure of Syntax RichK Excel Discussion (Misc queries) 4 May 6th 05 08:15 AM


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