Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 102
Default countif with two criteria one a column of dates?

I have two columns and am entering the following formula
=COUNTIF($B$2:$B$436,"**-AU-****")+COUNTIF($A$2:$A$436,"**/**/2005")

The wildcards in the B column are used to show that I only want to count the
cells in that column that have AU in the middle.

I then want to break it down futher by counting how many times 2005 appears
in the corresponding cell of column A

This is not working - where am I going wrong please?
--
Thanks as always

Lise
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 420
Default countif with two criteria one a column of dates?

If that -AU- has to be in the 3rd to 6th character:

=sumproduct(--(mid($b$2:$b$436,3,4)="-AU-"),
--(year($a$2:$a$436)=2005))

If it can be anywhe

=sumproduct(--(IsNumber(search("-AU-",$B$2:$B$436))),
--(Year($A$2:$A$436)=2005))

Use Find if that -AU- is different from -au- (case matters).

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


Lise wrote:

I have two columns and am entering the following formula
=COUNTIF($B$2:$B$436,"**-AU-****")+COUNTIF($A$2:$A$436,"**/**/2005")

The wildcards in the B column are used to show that I only want to count the
cells in that column that have AU in the middle.

I then want to break it down futher by counting how many times 2005 appears
in the corresponding cell of column A

This is not working - where am I going wrong please?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default countif with two criteria one a column of dates?

To meet both criteria:

=SUMPRODUCT((MID(A2:A436,4,2)="AU")*(YEAR(B2:B436) =2005))

--
Gary''s Student - gsnu201002


"Lise" wrote:

I have two columns and am entering the following formula
=COUNTIF($B$2:$B$436,"**-AU-****")+COUNTIF($A$2:$A$436,"**/**/2005")

The wildcards in the B column are used to show that I only want to count the
cells in that column that have AU in the middle.

I then want to break it down futher by counting how many times 2005 appears
in the corresponding cell of column A

This is not working - where am I going wrong please?
--
Thanks as always

Lise

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 102
Default countif with two criteria one a column of dates?

Fabulous - thankyou both :-)
--

Lise


"Dave Peterson" wrote:

If that -AU- has to be in the 3rd to 6th character:

=sumproduct(--(mid($b$2:$b$436,3,4)="-AU-"),
--(year($a$2:$a$436)=2005))

If it can be anywhe

=sumproduct(--(IsNumber(search("-AU-",$B$2:$B$436))),
--(Year($A$2:$A$436)=2005))

Use Find if that -AU- is different from -au- (case matters).

Adjust the ranges to match--but you can't use whole columns (except in xl2007+).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html


Lise wrote:

I have two columns and am entering the following formula
=COUNTIF($B$2:$B$436,"**-AU-****")+COUNTIF($A$2:$A$436,"**/**/2005")

The wildcards in the B column are used to show that I only want to count the
cells in that column that have AU in the middle.

I then want to break it down futher by counting how many times 2005 appears
in the corresponding cell of column A

This is not working - where am I going wrong please?


--

Dave Peterson
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Countif with multiple criteria in the same column. Harley Excel Discussion (Misc queries) 5 May 5th 23 07:44 PM
Use multiple criteria with COUNTIF: between dates and not blank l.shields Excel Worksheet Functions 13 July 27th 09 06:53 PM
COUNTIF: 2 criteria: Date Range Column & Text Column MAC Excel Worksheet Functions 14 September 16th 08 04:39 PM
COUNTIF, dates and blank cell criteria luvthavodka Excel Discussion (Misc queries) 6 June 1st 06 09:48 PM
How do you use countif for several column criteria? Fustrated Excel Worksheet Functions 1 February 9th 05 05:30 PM


All times are GMT +1. The time now is 08:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"