View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
mikebres
 
Posts: n/a
Default Help with a complicated array formula

Try this
{=SUM(IF(((dataA=1)+(dataA=2)+(dataA=3))*((dataB4 )*(dataB<5)),dataC))}

Make sure you press Control Shift Enter to make this an array formula. Just
to simplfy the formula I named the ranges where dataA is the data in column
A, dataB is the data in column B, etc. To explain a little, the plus works
as an OR and the multilpication acts as an AND.

Mike

"boooney" wrote:

Hi--

I'm trying to sum an array that meets certain conditions into a single
cell

A B C
1
2
3

I need the function to sum column C for instances whe
(column A = 1 or 2 or 3) and
(column B 4 and <5)

1-3 are numbers and 4,5 are dates

Can anyone help with the syntax I should use? I've found array formula
samples of AND and OR, but not both together. Everything I've tried so
far has failed to produce the result I need.

Thanks in advance.