countif - advanced

mieliepap

New Member
Joined
Apr 15, 2011
Messages
12
i want to use countif/ if statement to do a conditional count as follows
I have a column of figures, with a date last modified in a column next to the figures.
in a new cell, ie not in either of those columns, i want to add up figure occouring in a specific date range.
so, there will be for example 6 cells in the column modified in the month of march, I want to sum only those cells.
Any ideas?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Assuming your figures are in column A, dates in column B

=SUMPRODUCT(--(MONTH(B1:B100)=3),(A1:A100))
 
Upvote 0
Welcome to the Board!

Here are a few ways to accomplish it, note that the countifs formula is only available in Excel 2007 and newer:
Excel Workbook
ABC
13/1/20113
23/7/20113
34/12/20113
42/10/20113
53/9/2011
6
7
8
9
10
Sheet2
Cell Formulas
RangeFormula
C1=COUNTIF(A1:A10," > ="&"3/1/11"*1)-COUNTIF(A1:A10," > ="&"3/31/11"*1)
C2=COUNTIFS(A1:A10," > ="&"3/1/11"*1,A1:A10,"< ="&"3/31/11"*1)
C3=SUMPRODUCT((A1:A10 > ="3/1/11"*1)*(A1:A10< ="3/31/11"*1))
C4=SUMPRODUCT(--(MONTH(A1:A10)=3))

Hope that helps.
 
Upvote 0
Sorry I just read the part about summing, you will want to use Neil's solution or there are functions called sumif and sumifs that could do the same thing sumproduct is doing.
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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