#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default IF value

If column A, rows 2 through 2,000, contains the date 2/22/08 and column B
(same rows) contains the value 2, I want to count the number of occurrences
of the letters "a" and "m" in column D (same rows).

Please let me know if you can help. Thanks.

Bob
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF value

I want to count the number of occurrences of
the letters "a" and "m" in column D


Do you mean "a" *OR* "m" ?

This will count "a" *OR* "m" :

=SUMPRODUCT((A2:A2000=DATE(2008,2,22))*(B2:B2000=2 )*(D2:D2000={"A","M"}))

Or, use cells to hold the criteria:

F2 = 2/22/2008
G2 = 2
H2:H3 = A; M

=SUMPRODUCT(--(A2:A2000=F2),--(B2:B2000=G2),--(ISNUMBER(MATCH(D2:D2000,H2:H3,0))))


--
Biff
Microsoft Excel MVP


"bob" wrote in message
...
If column A, rows 2 through 2,000, contains the date 2/22/08 and column B
(same rows) contains the value 2, I want to count the number of
occurrences
of the letters "a" and "m" in column D (same rows).

Please let me know if you can help. Thanks.

Bob



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default IF value

Assuming your 2/22/2008 date is in a cell (E1 for this example), then this
seems to work...

=SUMPRODUCT((A1:A20=E1)*(B1:B20=2)*((D1:D20="a")+( D1:D20="m")))

If you really want to hard-code the date in the formula, then this seems to
work...

=SUMPRODUCT((A1:A20=--"2/22/2008")*(B1:B20=2)*((D1:D20="a")+(D1:D20="m")))

Note that


"bob" wrote in message
...
If column A, rows 2 through 2,000, contains the date 2/22/08 and column B
(same rows) contains the value 2, I want to count the number of
occurrences
of the letters "a" and "m" in column D (same rows).

Please let me know if you can help. Thanks.

Bob


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF value

From the way you have described your setup, this might work for you:

=COUNTIF(D:D,"a")+COUNTIF(D:D,"m")

Hope this helps.

Pete

On Apr 13, 7:01*pm, bob wrote:
If column A, rows 2 through 2,000, contains the date 2/22/08 and column B
(same rows) contains the value 2, I want to count the number of occurrences
of the letters "a" and "m" in column D (same rows).

Please let me know if you can help. Thanks.

Bob


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



All times are GMT +1. The time now is 11:04 PM.

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

About Us

"It's about Microsoft Excel"