help with countif for two criteria, one of which is a date based on the current date

ChIpStIcK

New Member
Joined
Dec 12, 2011
Messages
25
Good evening benevolent board.

I have a diary comprised of tasks listed in column A (eg take dog for a walk, blow nose, go to bed, drop kids at pool) and the dates they are due to be done in column D, in the format 05/10/2013.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]go to bed[/TD]
[TD][/TD]
[TD][/TD]
[TD]20/07/2013[/TD]
[/TR]
[TR]
[TD]xxxxxx[/TD]
[TD]¬_¬[/TD]
[TD]:)[/TD]
[TD]guff line, see below[/TD]
[/TR]
[TR]
[TD]go to bed[/TD]
[TD][/TD]
[TD][/TD]
[TD]25/07/2013[/TD]
[/TR]
[TR]
[TD]drop kids at pool[/TD]
[TD][/TD]
[TD][/TD]
[TD]25/08/2013[/TD]
[/TR]
[TR]
[TD]blow nose[/TD]
[TD][/TD]
[TD][/TD]
[TD]10/09/2013[/TD]
[/TR]
</tbody>[/TABLE]

I am trying to create another sheet with a summary of my total tasks each month. So, for example, I need to be able to count the number of times I will need to "blow nose" in a given month relative to the current month.

So,
[TABLE="width: 500"]
<tbody>[TR]
[TD]Tasks[/TD]
[TD]Number of occurences this month[/TD]
[TD]Number of occurences next month[/TD]
[TD]Number of occurnces the month after that[/TD]
[/TR]
[TR]
[TD]Blow nose[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]drop kids at pool[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]go to bed[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]


I've been trying to combine =SUMPRODUCT((Diary!A:A="blow*")*(Diary!D:D="EOMONTH(today()stuff...etc...argh"))
but my feeble brain is getting me nowhere. Help!

Btw, its excel 2010 I'm using and the diary is maybe 2000 lines, lots of them blank or full of other guff in the columns that I need to take tasks and date values from.
 
Last edited:

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I know nothing of pivot tables but it doesn't seem to want to create one, seemingly because my data is too messy.
 
Upvote 0
Maybe:
Excel Workbook
ABCDEFGHIJ
1go to bed20/07/2013Tasks05/07/201331/08/201330/09/2013
2xxxxxx_25/07/2013Blow nose001
3go to bed25/07/2013drop kids at pool010
4drop kids at pool25/08/2013go to bed200
5blow nose10/09/2013
6
Sheet3
 
Upvote 0
Brilliant thanks. Not sure I can quite follow the logic but works beautifully.

Had to amend slightly as when words were in the date column it would give value errors.
If anyone is interested, the finished article is below. I has dates, D has tasks on spreadsheet "Diary". A has the tasks I'm looking for and Row 5 has eomonth(today()+howevermany).
=SUMPRODUCT(--(IFERROR(MONTH(Diary!$I:$I),0)=MONTH(E$5)),--(Diary!$D:$D=$A17))
Thanks again.
 
Upvote 0

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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