• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

need to determine how many records there are between 2 dates

htonamie

New Member
I have a workbook with approximately 1500 names of contractors, the dates their contracts started and the dates they are projected to be renewed. I'm trying to now chart how many contracts end in a given month. tried countifs but obviously I've not created the formula correctly. any suggestions?
 
I'm trying to do a record count in tab 2 to show how many contracts expire in a given month based on the dates in tab 1
 

Attachments

  • Contract Chart by Month.xlsx
    11.3 KB · Views: 12
hi,
i have used:
=SUMPRODUCT(--(MONTH(CONTRACTORS!$E$2:$E$5)=ROW()-1))

and update your dates with real numbers.
Previously your dates stored as text.
 

Attachments

  • Contract Chart by Month-1.xlsx
    10.9 KB · Views: 4
Having dates in correct format will help and is actually better.

If there's some reason for keeping format as it is then in cell B2 try following formula:
=SUMPRODUCT(--(MID(CONTRACTORS!$E$2:$E$5,5,2)=TEXT(MATCH(A2,{"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"},0),"00")))
and copy down. AUG and SEP months are not in your list for some reason.
 
You could use in CONTRACT RENEW BY MONTH CHART!B2:
=SUMPRODUCT(--(MID(CONTRACTORS!$E$2:$E$5,5,2)=INDEX({"01","02","03","04","05","06","07","08","09","10","11","12"},MATCH(A2,{"JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"},0))))
 
@htonamie ,

If you keep the dates in the same format, you can try below formula in B2 and copy down:

=SUMPRODUCT(--(MONTH(A2&1)=(--MID(CONTRACTORS!$E$2:$E$5,5,2))))

Regards,
 
Back
Top