View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default nested MATCH within Array formula?

Try this normally entered formula (not array entered):

=SUMPRODUCT(--(Data!$A$2:$A$1000="January"),--(ISNUMBER(MATCH(Data!$B$2:$B$1000,UpperSouth,0))),--(ISNUMBER(MATCH(Data!$C$2:$C$1000,LowerLimb,0))))


--
Biff
Microsoft Excel MVP


"katy" wrote in message
...
I have a large table of data (incident reports) and I want to use an array
formula to give me a count of incidents where
- the month is January (months are in column A)
- the region is Nelson, Marlborough or Canterbury (regions are in col B)
- the body part is foot, knee or leg (body parts are in col C)

I have a named range called UpperSouth which contains Nelson, Marlborough
and Canterbury
and I have a named range called LowerLimb which contains leg, foot and
knee

I can get a count of all incidents in UpperSouth area in January using the
array formula
=COUNT(IF(Data!$A$2:$A$1000="January",MATCH(Data!$ B$2:$B$1000,UpperSouth,0)))

or I can get a count of all incidents in January involving lower limbs by
using
=COUNT(IF(Data!$A$2:$A$1000="January",MATCH(Data!$ C$2:$C$1000,LowerLimb,0)))

but what I can't work out is how to nest my MATCHes so I can get a count
of
incidents in January, in the UpperSouth area involving lower limbs.

Help!
Thanks
Katy