A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Counting w/ multiple criteria using named ranges



 
 
Thread Tools Display Modes
  #1  
Old March 25th, 2004, 03:55 PM
Kevin M
external usenet poster
 
Posts: n/a
Default Counting w/ multiple criteria using named ranges

Is it possible to use an array formula with 2 named ranges?

{=sum((PROV="AB")*(CLASS=1))}
where Prov and Class are equal and are entered as such:
PROV=OFFSET(Sheet1!$G$3,0,0,COUNT(Sheet1!$G:$G),1)
CLASS=OFFSET(Sheet1!$H$3,0,0,COUNT(Sheet1!$H:$H),1 )

doesn't seem to work, but the ranges should be the same at
any given time.

TIA
Kevin M
  #2  
Old March 25th, 2004, 04:29 PM
Vasant Nanavati
external usenet poster
 
Posts: n/a
Default Counting w/ multiple criteria using named ranges

Array formulas have trouble with entire column ranges. Untested, but try,
for example, $G1:$G65535 rather than $G:$G.

--

Vasant

"Kevin M" wrote in message
...
Is it possible to use an array formula with 2 named ranges?

{=sum((PROV="AB")*(CLASS=1))}
where Prov and Class are equal and are entered as such:
PROV=OFFSET(Sheet1!$G$3,0,0,COUNT(Sheet1!$G:$G),1)
CLASS=OFFSET(Sheet1!$H$3,0,0,COUNT(Sheet1!$H:$H),1 )

doesn't seem to work, but the ranges should be the same at
any given time.

TIA
Kevin M



  #3  
Old March 25th, 2004, 05:38 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Counting w/ multiple criteria using named ranges

Hi
try
=SUMPRODUCT((PROV="AB")*(CLASS=1))
both range have to be of the same size

--
Regards
Frank Kabel
Frankfurt, Germany


Kevin M wrote:
Is it possible to use an array formula with 2 named ranges?

{=sum((PROV="AB")*(CLASS=1))}
where Prov and Class are equal and are entered as such:
PROV=OFFSET(Sheet1!$G$3,0,0,COUNT(Sheet1!$G:$G),1)
CLASS=OFFSET(Sheet1!$H$3,0,0,COUNT(Sheet1!$H:$H),1 )

doesn't seem to work, but the ranges should be the same at
any given time.

TIA
Kevin M

  #4  
Old March 26th, 2004, 03:48 AM
Aladin Akyurek
external usenet poster
 
Posts: n/a
Default Counting w/ multiple criteria using named ranges

Check whether re-defining PROV and CLASS gives the expected results:

PROV ==
Sheet!$G$3:INDEX(Sheet1!$G:$G,MATCH(9.999999999999 99E+307,Sheet1!$H:$H))
CLASS ==
Sheet!$H$3:INDEX(Sheet1!$H:$H,MATCH(9.999999999999 99E+307,Sheet1!$H:$H))

where the Match bit makes use of the numeric range in H in both definitions.

Now try your array formula

{=sum((PROV="AB")*(CLASS=1))}

or the equivalent

=SUMPRODUCT(--(PROV="AB"),--(CLASS=1))

which you need to confirm with just enter.

"Kevin M" wrote in message
...
Is it possible to use an array formula with 2 named ranges?

{=sum((PROV="AB")*(CLASS=1))}
where Prov and Class are equal and are entered as such:
PROV=OFFSET(Sheet1!$G$3,0,0,COUNT(Sheet1!$G:$G),1)
CLASS=OFFSET(Sheet1!$H$3,0,0,COUNT(Sheet1!$H:$H),1 )

doesn't seem to work, but the ranges should be the same at
any given time.

TIA
Kevin M



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.