View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
expect_ed expect_ed is offline
external usenet poster
 
Posts: 53
Default Sumif Fails w Date as Text

I don't think that is correct. According to Excel the first parameter is the
compare range and the 3rd parameter is the cells to be summed.
In any case I tried switching it and still get zero.
Thanks anyway.
ed

"Roger Govier" wrote:

Hi Ed

I think you have the formula the wrong way round.
You are saying the "dates" are in C and the values to be summed in A.
Try
=SUMIF(C10:C100,P1,A10:A100)


--
Regards
Roger Govier



"expect_ed" wrote in message
...
I have a column (A) that calculates a date to the nearest 1st of the month
based on a date in another column on another sheet (Sheet2!G).
The calculation is of the form =VALUE(LEFT(Sheet2!G43,2))+1 & "/1"
Column A is formatted as text.
Then I have a set of cells (P1 to P8) that calculates the first of the
month
out 2 to 10 months.
That calculation is of the form = (MONTH(TODAY())+#) & "/1" where #
varies
from 2 to 10.
So in column A I get values like 10/1, 12/1, 11/1, etc. and in P I also
get
similar values. Column P is also formatted as text.
In Column C there are work hours associated with the month starts in col A
and I want to total the work hours for each month start, so in Column H If
have the following calculations:

H1: =SUMIF(A10:A100,P1,C10:C100)
H2: =SUMIF(A10:A100,P2,C10:C100)
etc.

So when P2 = 10/1 I would expect H2 to contain the total of any cells in C
that have a value of 10/1. Instead I get a zero.

I have tried to confirm that the values match with the formula =IF(P2 =
A5,1,0) where A5 displays 10/1 and the result is a 1, meaning that the
cells
match, but I still get only a 0 in H2.

Any help appreciated.
thanks
ed