using SUMPRODUCT with DATE

trader1990

New Member
Joined
Apr 13, 2018
Messages
5
I am building inventory report to show how inventory is doing
When I do counts for each day I enter manual data into the excel table i have build
like in first column I have Date of cycle count, next part#, Stock location, physical count, variance value $
I tally all the numbers on a separate table to be more readable
I am having trouble with SUM product function and date range
I want to count how many variances are in a month,
The tables I use are
DATE of cycle count and Variance
in the month of January I have entered 700 lines and each line has a variance of either $0 or $ range in plus (extra stock) and minus (missing stock)
I want to count the variances how many I have done in January , february, march
originally I use this function =SUMPRODUCT(--(LEN(G23:G10000)>0)) and it calculates perfectly the variances but now I have data entry for February, March, and April
and this function counts all how can I make this work for each separate month?
all The dates are entered in A23:A10000 and variances are in G23:G10000
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi,

If I understand correctly, the following will do what you want, might need some tweaking if I misunderstood.
Also, the formula you're using to Count Variances can be done simply by a COUNTA function, as shown in L23 and M23.


Excel 2010
ABGHIJKLM
22DateVarianceMonthVariance CountYour sumproduct formulaCount formula
232/2/20181Feb-18288
243/5/20182Mar-181
252/5/20183Apr-183
264/15/20184
274/7/2018
2810/11/20186
294/18/20187
307/20/20188
314/1/20189
Sheet18
Cell Formulas
RangeFormula
L23=SUMPRODUCT(--(LEN(G23:G10000)>0))
M23=COUNTA(G23:G10000)
J23=SUMPRODUCT((MONTH(A23:A10000)=MONTH(I23))*(G23:G10000<>""))
 
Upvote 0
Avoid testing just month, unless the year must be explicitly ignored... So, for correctness:

=SUMPRODUCT(--($A$23:$A$31-DAY($A$23:$A$31)+1=E23),--ISNUMBER($C$23:$C$31))

where E23 is a first day date like 2018-02-01 (means the month/year of February 2018).
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,821
Members
449,049
Latest member
cybersurfer5000

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