Counting based on 2 criteria 1 being date exactly 3 months today

AndrewD04

New Member
Joined
Aug 24, 2017
Messages
40
Office Version
  1. 365
Good Morning,

Sorry i cant upload a copy of excel my system just wont allow it.

I am trying to count how many times the word Valid appears in column E of Sheet 2 if Column B matches P8 of Sheet 1 and Column C of sheet 2 is exactly 3 months from today not including days.

=SUMPRODUCT((Sheet 2!E:E="Valid")*(Sheet 2!C:C>=DATE(YEAR(TODAY()),MONTH(TODAY())-3,1)*(Sheet 2!B:B='Sheet 1'!P8)))
=AND(Sheet 2!E:E="Valid", Sheet 2!C:C>=DATE(YEAR(TODAY()),MONTH(TODAY())-3,1), ISNUMBER(MATCH('Sheet 1'!P8, Sheet 2B:B, 0)))

These are just 2 ways i have tried and both are returning False for all lines even though there is a match.

Thanks in advance

Dan
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
The first one should work to return any matching data with dates after 1st April 2023, which is of course not "exactly 3 months from today". It's also not a good idea to use SUMPRODUCT with entire columns, so you could use countifs instead:

Excel Formula:
=COUNTIFS('Sheet 2'!E:E,"Valid",'Sheet 2'!C:C,|">="&DATE(YEAR(TODAY()),MONTH(TODAY())-3,1),'Sheet 2'!B:B,'Sheet 1'!P8)
 
Upvote 1
Solution

Forum statistics

Threads
1,224,829
Messages
6,181,222
Members
453,024
Latest member
Wingit77

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