A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Help with IF - THEN



 
 
Thread Tools Display Modes
  #1  
Old November 13th, 2009, 02:03 PM posted to microsoft.public.excel.misc
cindyt
external usenet poster
 
Posts: 17
Default Help with IF - THEN

Hi - need formula that will count in one column based on condition in another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct
  #2  
Old November 13th, 2009, 02:05 PM posted to microsoft.public.excel.misc
Bob Phillips[_2_]
external usenet poster
 
Posts: 1,562
Default Help with IF - THEN

=SUMPRODUCT(--(A2:A200="Blue"),--(B2:B200="Y"))

--
__________________________________
HTH

Bob

"Cindyt" wrote in message
...
Hi - need formula that will count in one column based on condition in
another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct



  #3  
Old November 13th, 2009, 02:23 PM posted to microsoft.public.excel.misc
Jacob Skaria
external usenet poster
 
Posts: 5,952
Default Help with IF - THEN

When you have multiple criteria use SUMPRODUCT()

=SUMPRODUCT((A1:A10=criteria1)*(B1:B10=criteria2))
=SUMPRODUCT((A1:A10=F1)*(B1:B10=F2))

If this post helps click Yes
---------------
Jacob Skaria


"Cindyt" wrote:

Hi - need formula that will count in one column based on condition in another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct

  #4  
Old November 13th, 2009, 02:23 PM posted to microsoft.public.excel.misc
Mike H
external usenet poster
 
Posts: 8,419
Default Help with IF - THEN

Hi,

Maybe this

=SUMPRODUCT((A1:A19="Blue")*(B1:B19="Y"))

Mike

"Cindyt" wrote:

Hi - need formula that will count in one column based on condition in another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct

  #5  
Old November 13th, 2009, 02:25 PM posted to microsoft.public.excel.misc
Sean Timmons
external usenet poster
 
Posts: 1,722
Default Help with IF - THEN

Ahh, the ever popular SUMPRODUCT!

=SUMPRODUCT((A2:A5000="Blue")*(B2:B5000="Y"))

Please note, cannot use entire column (A:A), and both ranges must match
(2-5000, or 2 - 100, or whatever)

"Cindyt" wrote:

Hi - need formula that will count in one column based on condition in another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct

  #6  
Old November 13th, 2009, 05:38 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
Default Help with IF - THEN

If you're using Excel 2007:

=COUNTIFS(A1:A100,"Blue",B1:B100,"Y")

Better to use cells to hold the criteria:

D1 = Blue
E1 = Y

=COUNTIFS(A1:A100,D1,B1:B100,E1)

--
Biff
Microsoft Excel MVP


"Cindyt" wrote in message
...
Hi - need formula that will count in one column based on condition in
another
column.

For Instance - if column A has "Blue" , I want to check column B and if it
has "Y" I want to count the number of "Y"'s (associated with Blue)

Thanks for your help in advance. ct



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:59 PM.


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