|
| Sumif function |
 |
Thu, 13 Dec 2007 15:08:56 -050 |
I am trying to use the SUMIF function to total the values in one colum based
on whether the values in another column fall within a certain time frame.
I have time time in column A, dollars in column B and wish to total all the
Dollar values in Col B that occur when time is between 9:30 AM and 10:30 AM.
This is how I coded it: @SUMIF(+A1..A40, >+C1#AND#<+C2, +B1..B40).
I get Syntax Error.
If I change it to this: @SUMIF(+A1..A40, +A1..A40>+C1#AND#+A1..A40<+C2,
+B1..B40).
Then I get ERR in the cell
Can anyone help me with this?
Thank you very much.
Bill Daniel
|
| Post Reply
|
| Re: Sumif function |
 |
Thu, 13 Dec 2007 15:10:18 -070 |
Bill Daniel wrote:
> I am trying to use the SUMIF function to total the values in one colum
based
> on whether the values in another column fall within a certain time frame.
>
> I have time time in column A, dollars in column B and wish to total all the
> Dollar values in Col B that occur when time is between 9:30 AM and 10:30
AM.
> This is how I coded it: @SUMIF(+A1..A40, >+C1#AND#<+C2, +B1..B40).
>
> I get Syntax Error.
>
> If I change it to this: @SUMIF(+A1..A40,
+A1..A40>+C1#AND#+A1..A40<+C2,
> +B1..B40).
>
> Then I get ERR in the cell
@SUMIF can only handle single constraints. For multiple criteria, you need to
revert to one of several possible array formulas, such as:
@SUM((A1..A40>C1#AND#A1..A40<C2)*(B1..B40))
or the purely arithmetic equivalent:
@SUM((A1..A40>C1)*(A1..A40<C2)*(B1..B40))
Cheers,
Uli
|
| Post Reply
|
|
|
|
|
|
|
|
|
|