Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Multiple condition countif?

Hello,

How can I do some thing like this:

Count an occurance if value in col. A is "LifeMember" and value in Column E
is "Y" for a given range ? for instance A1:A100 and E1:E100 ?

I am trying COUNTIF but dont know how do I count only if BOTH conditions are
true?


--
Thanks !
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Multiple condition countif?

=SUMPRODUCT(--(A1:A100="LifeMember")*(E1:E100="Y"))

"kshah_us" wrote:

Hello,

How can I do some thing like this:

Count an occurance if value in col. A is "LifeMember" and value in Column E
is "Y" for a given range ? for instance A1:A100 and E1:E100 ?

I am trying COUNTIF but dont know how do I count only if BOTH conditions are
true?


--
Thanks !

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Multiple condition countif?

hi
countif in for 1 criteria. for more than one, might be better to use
sumproduct.
=sumproduct(--(A1:A100="lifemenber")*--(E1:E100="Y"))

Regards
FSt1

"kshah_us" wrote:

Hello,

How can I do some thing like this:

Count an occurance if value in col. A is "LifeMember" and value in Column E
is "Y" for a given range ? for instance A1:A100 and E1:E100 ?

I am trying COUNTIF but dont know how do I count only if BOTH conditions are
true?


--
Thanks !

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Multiple condition countif?


Well, I suggest you to use macro instead
1.Right click on the toolbar select control box
2. From the control box that appears on the sheet, select and draw a
control box on the sheet
3.Double click the command button to open code window and paste
following codes

Code:
--------------------

Private Sub CommandButton1_Click()
Dim row As Integer, col As Integer
row = 1
col = 1

Dim count As Integer
count = 0
While Sheet1.Cells(row, col).Value < ""
If Sheet1.Cells(row, col).Value = "LifeMember" And Sheet1.Cells(row, col + 4).Value = "Y" Then
count = count + 1
End If
row = row + 1
Wend

MsgBox "Count=" & count
End Sub

--------------------



Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com




--
Chris Bode
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Multiple condition countif?

Are you sure that you need the double unary minus when you are multiplying?
--
David Biddulph

"Pepito Delaosamayor" wrote
in message ...
=SUMPRODUCT(--(A1:A100="LifeMember")*(E1:E100="Y"))

"kshah_us" wrote:

Hello,

How can I do some thing like this:

Count an occurance if value in col. A is "LifeMember" and value in Column
E
is "Y" for a given range ? for instance A1:A100 and E1:E100 ?

I am trying COUNTIF but dont know how do I count only if BOTH conditions
are
true?


--
Thanks !





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Multiple condition countif?

Are you sure that you need the double unary minuses when you are
multiplying?
They would, of course, have been needed if it were a comma instead of the
multiplying *
--
David Biddulph

"FSt1" wrote in message
...
hi
countif in for 1 criteria. for more than one, might be better to use
sumproduct.
=sumproduct(--(A1:A100="lifemenber")*--(E1:E100="Y"))

Regards
FSt1

"kshah_us" wrote:

Hello,

How can I do some thing like this:

Count an occurance if value in col. A is "LifeMember" and value in Column
E
is "Y" for a given range ? for instance A1:A100 and E1:E100 ?

I am trying COUNTIF but dont know how do I count only if BOTH conditions
are
true?


--
Thanks !



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
COUNTIF - Condition Sandesh Excel Discussion (Misc queries) 7 August 24th 08 08:58 AM
Multiple condition countif for excel 2003 goayimm Excel Worksheet Functions 5 May 30th 08 08:22 AM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
COUNTIF - more than one condition Gary Excel Worksheet Functions 4 May 8th 07 08:46 PM
countif condition problem Scott Excel Worksheet Functions 8 November 11th 05 08:59 AM


All times are GMT +1. The time now is 06:29 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"