Counting distinct occurences between two columns based on date

SHUTTEHFACE

Board Regular
Joined
Aug 13, 2014
Messages
53
Hi All,

I'm using the below formula to try and calculate count of dates that are older than 90 days old between two columns (AK and AM). I want to make sure that should the value in AK AND the value in AM both be older than 90 days, they are only counted once.

<code>
Code:
=SUMPRODUCT(--('sheet1'!$B:$B="THC"),--('sheet1'!$AK:$AK<=TODAY()-90),--('sheet1'!$AM:$AM<=TODAY()-90),--('sheet1'!$E:$E={"1, THC Pilot","1, Both Pilot","2, THC Pilot","2, Both Pilot","3, THC Pilot","3, Both Pilot"}))
</code>
Can anyone assist?

Cheers,

STF
 
Last edited:
I can't see how this relates to your original formula & description at all. :confused:
That is still the case.
I can't tell what columns I am looking at in post 6 but I presume "Received" and "Final approval" are columns AK and AM in your formula. If so, there appears to be only 2 rows in that data where both dates are more than 90 days old so I have no idea how you (manually) get a result of 7.

Further, you have shown a cell containing "THC pilot". Does that have anything to do with the count you are trying to calculate? If so, what cell is it and how does it relate to the problem.

BTW, posting formulas that you have tried and do not work, doesn't actually help. What helps the most is accurate sample data and expected results and a clear explanation of how the result(s) would be obtained manually.
It is also much easier if we can see what rows/columns any sample data is in and still copy that data to our sheets to test. Links in my signature block below can help with that.
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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