Looking for help on a count function

joshk87

New Member
Joined
Jun 17, 2011
Messages
9
I believe what I'm trying to accomplish is simple, but I just can't seem to get any results no matter what function I try.

Here's the scenario. I have a column labled "Date Required" (column K) and a column labled "Date Completed" (column I). I want to capture 3 things from these two columns and chart them. I would like to know the number of times a given "Date Completed" is either on time, late, or early. That way I can pie chart the percentage of jobs throughout the year that are one of those three; on time, late, or early.

I treid using countif to say that if the cells in column K is greater than column I then give me the count. Same thing goes for less than or equal to. Nothing seems to be working and I can't find out if this is even the best function to use.

Any help would be much appreciated!
 
Can you post some sample data and tell us what results you expect?

Which column(s) have empty cells?

If you're filling out a report/form and you predict a date for an item to be completed then the "date required" field should not be empty while the "date completed" field contains an entry.


Both columns will have empty cells. Right now in the small sample im working on the only column with an empty cell is K. Column I is my date required, and K is my completed date. The date completed column will be filled out once we complete a job, it's not a predicted date. Therefore I will have dates in the required, but not all of the completed will have a date right away, only as the job is finished. This list will eventually be well over 100 rows long, so I would like to set it up now as I2:I500 and K2:K500 just to cover myself. That way as i add rows when required I won't have to mess with equation.

I hope this isn't too confusing. I feel like it's 99% there with the help you've given so far. I basically just need the equation to ignore empty cells in both columns.
 
Upvote 0

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Both columns will have empty cells. Right now in the small sample im working on the only column with an empty cell is K. Column I is my date required, and K is my completed date. The date completed column will be filled out once we complete a job, it's not a predicted date. Therefore I will have dates in the required, but not all of the completed will have a date right away, only as the job is finished. This list will eventually be well over 100 rows long, so I would like to set it up now as I2:I500 and K2:K500 just to cover myself. That way as i add rows when required I won't have to mess with equation.

I hope this isn't too confusing. I feel like it's 99% there with the help you've given so far. I basically just need the equation to ignore empty cells in both columns.
OK, here's why I'm confused:

Here's the scenario. I have a column labled "Date Required" (column K) and a column labled "Date Completed" (column I).
The formulas I suggested were based on the above column criteria.

If we can figure out FOR CERTAIN which column is which I'm sure we can get this straightened out!
 
Upvote 0
OK, here's why I'm confused:


The formulas I suggested were based on the above column criteria.

If we can figure out FOR CERTAIN which column is which I'm sure we can get this straightened out!

My fault. Column K is "Completed Date". Column I is "Date Required". Sorry about that.

By the way, I'm leaving the office for the weekend in a few minutes. So I won't be able to do any more testing until Monday morning. Thanks for all the help so far and have a great weekend! I'm sure we'll get this figured out.
 
Upvote 0
My fault. Column K is "Completed Date". Column I is "Date Required". Sorry about that.

By the way, I'm leaving the office for the weekend in a few minutes. So I won't be able to do any more testing until Monday morning. Thanks for all the help so far and have a great weekend! I'm sure we'll get this figured out.
Try this...

Book1
IJK
1Required_Completed
27/16/2005_10/17/2001
35/2/2007__
43/21/2004__
52/3/2013_2/3/2013
69/16/2002_7/5/2003
71/29/2009_6/11/2011
88/6/2004_8/16/2001
97/2/2006__
102/10/2008_7/30/2001
11___
12___
13___
14___
15___
16___
17On Time_1
18Late_2
19Early_3
Sheet1

On time:

=SUMPRODUCT(--(K2:K15<>""),--(K2:K15=I2:I15))

Late:

=SUMPRODUCT(--(K2:K15>I2:I15))

Early:

=SUMPRODUCT(--(K2:K15<>""),--(K2:K15 < I2:I15))
 
Upvote 0
Works pefect!! Thanks so much for your help! If I wanted to use this formula and reference a different sheet in the workbook would that be easy to do? The sheet with the data on it is called CAD LOG
 
Upvote 0
Works pefect!! Thanks so much for your help! If I wanted to use this formula and reference a different sheet in the workbook would that be easy to do? The sheet with the data on it is called CAD LOG


Nevermind this. Figured it out. Thanks again for the help!!
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,486
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top