Counting Values in a Column If Corresponding Date is in Current Month and Year

francoiscj1

New Member
Joined
Aug 21, 2017
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Column A: Date (00/00/00)
Column M: Reordered Quantity

Looking for a formula for cell P2. The formula should count the values in column M (Reordered Quantity) if the corresponding date in Column A falls within the current month and year. Thanks!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
as example:

today() =>> 14/01/2019


[Table="width:, class:head"]
[tr=bgcolor:#FFFFFF][td]
24/12/18​
[/td][td][/td][td]
222​
[/td][td][/td][td]
15​
[/td][td][/td][td]=SUMPRODUCT((TEXT($H$3:$H$32,"mm/yy")=TEXT(TODAY(),"mm/yy"))*(COUNT($J$3:$J$32)>0))[/td][/tr]

[tr=bgcolor:#FFFFFF][td]
25/12/18​
[/td][td][/td][td]
120​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
26/12/18​
[/td][td][/td][td]
184​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
27/12/18​
[/td][td][/td][td]
155​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
28/12/18​
[/td][td][/td][td]
176​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
29/12/18​
[/td][td][/td][td]
76​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
30/12/18​
[/td][td][/td][td]
112​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
31/12/18​
[/td][td][/td][td]
122​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
01/01/19​
[/td][td][/td][td]
75​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
02/01/19​
[/td][td][/td][td]
174​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
03/01/19​
[/td][td][/td][td]
28​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
20/01/19​
[/td][td][/td][td]
125​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
21/01/19​
[/td][td][/td][td]
143​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
22/01/19​
[/td][td][/td][td]
154​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
23/01/19​
[/td][td][/td][td]
133​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
24/01/19​
[/td][td][/td][td]
20​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
25/01/19​
[/td][td][/td][td]
208​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
26/01/19​
[/td][td][/td][td]
98​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
27/01/19​
[/td][td][/td][td]
114​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
28/01/19​
[/td][td][/td][td]
174​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
29/01/19​
[/td][td][/td][td]
83​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
30/01/19​
[/td][td][/td][td]
62​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
31/01/19​
[/td][td][/td][td]
210​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
01/02/19​
[/td][td][/td][td]
112​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
02/02/19​
[/td][td][/td][td]
60​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
03/02/19​
[/td][td][/td][td]
27​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
04/02/19​
[/td][td][/td][td]
216​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
05/02/19​
[/td][td][/td][td]
112​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
06/02/19​
[/td][td][/td][td]
43​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr=bgcolor:#FFFFFF][td]
07/02/19​
[/td][td][/td][td]
143​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


correct range to your needs
 
Last edited:
Upvote 0
ignore post above - wrong formula.

try: =SUMPRODUCT(--(TEXT($H$4:$H$33,"mm/yy")=TEXT(TODAY(),"mm/yy")))-SUMPRODUCT(--ISBLANK(($J$4:$J$33)))
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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