Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

working with dates

5 views
Skip to first unread message

Pe66les

unread,
Aug 24, 2005, 12:50:03 AM8/24/05
to
How can I write this expression so that my answer is not #VALUE?
I'm working with dates, and I want to count only the dates in columns H, J,
& L if they fall between the dates entered in F1 and H1.
IF H5 or J5 or L5 is >F1 and <=H1 count as 1.

Biff

unread,
Aug 24, 2005, 1:25:25 AM8/24/05
to
Hi!

> IF H5 or J5 or L5 is >F1 and <=H1 count as 1.

So, does that mean if all 3 cells meet the criteria it still counts as 1?

F1 = lower boundry date
H1 = upper boundry date

=IF(SUMPRODUCT(--(MOD(COLUMN(H5:L5),2)=0),--(H5:L5>=F1),--(H5:L5<=H1)),1,0)

Biff

"Pe66les" <Pe6...@discussions.microsoft.com> wrote in message
news:8A1A4047-CFB0-43F6...@microsoft.com...

Ron Rosenfeld

unread,
Aug 24, 2005, 1:26:54 AM8/24/05
to

I'm not sure if you want to count each qualifying date as 1 (so your result
range would be 0 to 3) or count 1 if any of the dates qualify (so your result
range would be 0 to 1)

For the former:

=AND(H5>F1,H5<=H1)+AND(J5>F1,J5<=H1)+AND(L5>F1,L5<=H1)

For the latter:

=--OR(AND(H5>F1,H5<=H1)+AND(J5>F1,J5<=H1)+AND(L5>F1,L5<=H1))


--ron

Pe66les

unread,
Aug 24, 2005, 11:19:02 PM8/24/05
to
Yes, if any or all 3 cells meet the criteria it only counts as 1.
0 new messages