Sumprodct count dates

Well-known Member
Hi All, please can you help.

I have this formular to count the dates in sheet 'jobs' column 'I' that are in the past, but its not counting the figures correctly.

Is there somthing i am missing?

=SUMPRODUCT(--(JOBS!\$N\$1:\$N\$4594=Sheet1!\$B2),--(JOBS!\$I\$1:\$I\$4594 < TODAY()))

Thanks

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
What is the first condition of your formula checking?

Can you tell us what is in columns N, I and in cell Sheet1!\$B2?

In what way is it not counting correctly? Maybe what's in Sheet1!B2 is the source of your problem.

Hello,

the first condition is customer id codes, so colmn N and b2 contain numbers. column I contains dates

Are the dates in column I in date format, or text format?

The dates are in date format,

I cant lock \$B\$2 as its part of a macro which loops down.

I have other sumproduct formulas working of B2 and they are working perfectly its just this one with the dates, strange

Are your IDs in the same format? Are you sure neither one has an extra space anywhere?

If not, can you post a small sample of your data?

One quick check to make sure your logic is working out, and to identify where the problem exists.

Identify a row that should be counted. For this example, let's say row 4. Try each part of your formula:

Does this return TRUE?
=JOBS!\$N\$4=Sheet1!\$B2

=JOBS!\$I\$4 < TODAY()

If either one returns FALSE, that is the source of your problem. The values that you think are equal really aren't (probably didn't formats, or extra spaces).

Jim,

JACKPOT

Just spotted column I with the dates does contain some blank cells.

Obviouly this must be the reason, how can i adjust my forular to not count the blank cells???

Cheers

Add another condition to make sure a date exists, i.e.

=SUMPRODUCT(--(JOBS!\$N\$1:\$N\$4594=Sheet1!\$B2),--(JOBS!\$I\$1:\$I\$4594 < TODAY()),--(JOBS!\$I\$1:\$I\$4594 > 0))

Replies
16
Views
280
Replies
8
Views
690
Replies
10
Views
439
Replies
2
Views
459
Replies
1
Views
136

1,217,383
Messages
6,136,272
Members
450,001
Latest member
KWeekley08

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?

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

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