Counting occurrences in a specified range and date

kebabpete

New Member
Joined
Apr 12, 2012
Messages
11
I'm currently using... =SUMPRODUCT((Quantity)*(MONTH(Date)=7)*(Adjustment_Type="Booking In Error"))

... to calculate the sum of a column based on a specified date range (MONTH(Date)=7) and also based on a specific criteria (Adjustment_Type).

Instead of finding the sum of the 'Quantity', can someone tell me what change to make to this formula to only count the number of occurrences within the same criteria?

Assume...
Column A = 'Adjustment Type'
Column B = 'Quantity'
Column C = 'Date'

Thanks!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
What version do you have? If 2007 or later try the Countifs formula, if i'm reading your formula correct just lose the quantity part from what you already have, or replace with Quantity<>"" which will make a count everytime theres a number in that colum wher the criterias met, if the default is 0 in the cell, swap the "" for >o
 
Last edited:
Upvote 0
Hmmm, May have confused myself a bit now. Using 2007... Have just tried... =COUNTIFS("<>",Month(Date)=7,">0",Adjustment_Type="Despatch Error"). If I remove the ">0" then there is too few arguments.
 
Upvote 0
I'm currently using... =SUMPRODUCT((Quantity)*(MONTH(Date)=7)*(Adjustment_Type="Booking In Error"))

... to calculate the sum of a column based on a specified date range (MONTH(Date)=7) and also based on a specific criteria (Adjustment_Type).

Instead of finding the sum of the 'Quantity', can someone tell me what change to make to this formula to only count the number of occurrences within the same criteria?

Assume...
Column A = 'Adjustment Type'
Column B = 'Quantity'
Column C = 'Date'

Thanks!


your formula will give count with your specified criteria if you just remove the sum range at end in your sumproduct formula :)
 
Upvote 0
I'm currently using... =SUMPRODUCT((Quantity)*(MONTH(Date)=7)*(Adjustment_Type="Booking In Error"))

... to calculate the sum of a column based on a specified date range (MONTH(Date)=7) and also based on a specific criteria (Adjustment_Type).

Instead of finding the sum of the 'Quantity', can someone tell me what change to make to this formula to only count the number of occurrences within the same criteria?

Assume...
Column A = 'Adjustment Type'
Column B = 'Quantity'
Column C = 'Date'

Thanks!

Try
=SUMPRODUCT((MONTH(Date)=7)*(Adjustment_Type="Booking In Error"))

M.
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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