using a formula to compare dates

G

george

I would like to create a formula that would count the amount of rows that
have today's date. For example:

Today's date: 10/02/2004

Who Date Serial # Pass
GGG 10/2/2004 12121 1
GGG 10/2/2004 12121 1
GGG 10/2/2004 12121 1
GGG 10/2/2004 12121 1
GGG 10/2/2004 12121 1


I want to compare the "date" column to the current date and sum up the
numbers in the "Pass" column. In this case the formula result would be "5".
I'm thinking it's a combination of VLOOKUP and the SUM function. Any help
on this would be greatly appreciated.
 
A

Ashish Mathur

Hi,

Use the sumif function. The formula will be:

SUMIF(C6:D8,C4,D6:D8)

C6:D8 - The entire range
C4 - the date which you are looking for
D6:D8 - The pass column range


Regards,

Ashish Mathur
 
G

george

Works great! Thanks for the quick response.

Ashish Mathur said:
Hi,

Use the sumif function. The formula will be:

SUMIF(C6:D8,C4,D6:D8)

C6:D8 - The entire range
C4 - the date which you are looking for
D6:D8 - The pass column range


Regards,

Ashish Mathur
 
D

Domenic

=SUMIF(B2:B6,"10/02/2004",D2:D6)

=SUMIF(B2:B6,DATE(2004,10,2),D2:D6)

=SUMIF(B2:B6,TODAY(),D2:D6)

Hope this helps!
 

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