Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Harley
 
Posts: n/a
Default Countif or Sumproduct

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"


  #2   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Countif or Sumproduct

With:
A1:A10 containing the FL cells
B1:B10 containing the Y cells

Try this:
D1: FL
D2: Y
D3:
=SUMPRODUCT(--((LEN(A1:A10)-LEN(SUBSTITUTE(UPPER(A1:A10),UPPER(D1),"")))<LEN( A1:A10))*(B1:B10=D2))

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"Harley" wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"


  #3   Report Post  
Posted to microsoft.public.excel.misc
Niek Otten
 
Posts: n/a
Default Countif or Sumproduct

I would introduce 2 helper columns. Of course it can be done many other
ways, but this way it is easy to check that your formula does what it is
supposed to do.
If your "Y"s are in A and your text in B, Then this in C:

=IF(AND(A1="y",NOT(ISERROR(C1))),1,0)

and this in D:

=IF(AND(A1="y",NOT(ISERROR(C1))),1,0)

both copied down as far as needed

Sum column D
--
Kind regards,

Niek Otten



"Harley" wrote in message
...
I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"




  #4   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Countif or Sumproduct

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"


  #5   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre
 
Posts: n/a
Default Countif or Sumproduct

THAT's what I was trying to think of!
It completely eluded me.

***********
Regards,
Ron

XL2002, WinXP-Pro


"Domenic" wrote:

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"





  #6   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Countif or Sumproduct

I know that feeling... :)

In article ,
"Ron Coderre" wrote:

THAT's what I was trying to think of!
It completely eluded me.

***********
Regards,
Ron

XL2002, WinXP-Pro


"Domenic" wrote:

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"



  #7   Report Post  
Posted to microsoft.public.excel.misc
Harley
 
Posts: n/a
Default Countif or Sumproduct

This did work - Thanks. I do have one situation where I need the formula to
find "FLH" or "FLT" under the same scenrio. Any thoughts?
Thanks again,

Harley

"Domenic" wrote:

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"



  #8   Report Post  
Posted to microsoft.public.excel.misc
Domenic
 
Posts: n/a
Default Countif or Sumproduct

Try...

=SUMPRODUCT((ISNUMBER(FIND({"FLH","FLT"},A1:A10))) *(B1:B10="Y"))

Hope this helps!

In article ,
Harley wrote:

This did work - Thanks. I do have one situation where I need the formula to
find "FLH" or "FLT" under the same scenrio. Any thoughts?
Thanks again,

Harley

"Domenic" wrote:

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"



  #9   Report Post  
Posted to microsoft.public.excel.misc
Harley
 
Posts: n/a
Default Countif or Sumproduct

That got it!!

Thanks!

"Domenic" wrote:

Try...

=SUMPRODUCT((ISNUMBER(FIND({"FLH","FLT"},A1:A10))) *(B1:B10="Y"))

Hope this helps!

In article ,
Harley wrote:

This did work - Thanks. I do have one situation where I need the formula to
find "FLH" or "FLT" under the same scenrio. Any thoughts?
Thanks again,

Harley

"Domenic" wrote:

Try something like the following...

=SUMPRODUCT(--(ISNUMBER(FIND("FL",A1:A10))),--(B1:B10="Y"))

Note that FIND is case sensitive. If you don't want the case to be
sensitive, use SEARCH instead.

Hope this helps!

In article ,
Harley wrote:

I need to count all cells in one column containing "FL" anywhere in the
sentence if the condition in another column is "Y"




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
Multi-conditions with SUMPRODUCT and COUNTIF MikeDH Excel Worksheet Functions 2 August 16th 05 02:06 AM
SumProduct or CountIf Kim Excel Worksheet Functions 7 July 9th 05 12:04 AM
countif, sumproduct mg New Users to Excel 7 July 1st 05 10:26 PM
Using COUNTIF with 2 criteria - SUMPRODUCT? Mike R. Excel Worksheet Functions 2 February 24th 05 05:57 AM
SUMPRODUCT & COUNTIF Connie Martin Excel Worksheet Functions 2 December 16th 04 06:53 PM


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