View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Katy Katy is offline
external usenet poster
 
Posts: 23
Default nested MATCH within Array formula?

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