View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default sum if dates conditional

What do you get?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"benjo4u" wrote in message
...
I had made a mistake in typing it in (wrong columns), but even with your

new
formula it still doesn't work.


=SUMPRODUCT(--(All!J2:J214="x"),--(DATE(YEAR(A47),MONTH(A47),DAY(M48))=All!
H2:H214),--(DATE(YEAR(A47),MONTH(A47),DAY(N48))<=All!H2:H214) )

the date column is formatted as date...

-Benjamin

"Bob Phillips" wrote:


=SUMPRODUCT(--(All!J3:J214="x"),--(DATE(YEAR(A48),MONTH(A48),DAY(M49))=All!
J3:J214),--(DATE(YEAR(A48),MONTH(A48),DAY(N49))<=All!J3:J214) )

--

HTH

RP
(remove nothere from the email address if mailing direct)


"benjo4u" wrote in message
...
I have a spreadsheet with two columns:
H contains dates and J contains x's.

The dates go from May to December. I have figured out the days that

each
month starts and ends. So, I want to sum up all rows with an x and in

between
two dates. For this, I have



=SUM(IF(All!J3:J214="x",IF(AND(DATE(YEAR(A48),MONT H(A48),DAY(M49))=All!J3:J
214,DATE(YEAR(A48),MONTH(A48),DAY(N49))<=All!J3:J2 14),"1","0")))

But that just gives 0. Any ideas?

-Benjamin