View Single Post
  #3   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

Col C is formatted as a number, with 2 decimal places.


"Toppers" wrote:

How is Column C formatted?

"expect_ed" wrote:

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