COUNT IF with unconditional AND on cell dates

A

Aramazd

I have a slight problem here any input would be appreciated.

Trying to gather a data that has 2 conditions where both of them have t
be true.
1st condition Name
2nd conditionam Date

Here is the code of what I haves so far.
=COUNT(IF(Requests!H:H,"<="&DATE(2012,4,31),IF(Requests!D:D,"Marcu
Comins")))

Ironically enough trying to set this up in VBA however need to get th
formula to fucntion in the first place.

Thanks in advance

Ara
 
I

isabelle

hi Aram,

=SUMPRODUCT(--(Requests!H1:H65535,"<="&DATE(2012,4,31))*(Requests!D1:D65535="Marcus Comins"))


--
isabelle



Le 2012-04-13 11:00, Aramazd a écrit :
 
I

isabelle

sorry,

=SUMPRODUCT(--(Requests!H1:H65535<=&DATE(2012,4,31))*(Requests!D1:D65535="Marcus Comins"))
 
A

Aramazd

Works, Thanks a lot!!

The challenge now would be actually implementing this code in VBA :
 
I

isabelle

hi,

ActiveCell.Formula = "=SUMPRODUCT(--(Requests!H1:H65535<=DATE(2012,4,31))*(Requests!D1:D65535=""Marcus Comins""))"

or

Dim dt As Long, rng1 As Range, rng2 As Range
dt = DateSerial(2012, 4, 30)
Set rng1 = Range("H1:H65535")
Set rng2 = Range("D1:D65535")
ActiveCell = Evaluate("SUMPRODUCT((Requests!" & rng1.Address & "<=" & dt & ")*(Requests!" & rng2.Address & "=""Marcus Comins""))")


--
isabelle



Le 2012-04-16 05:18, Aramazd a écrit :
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top