#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default FORMULAS

What formula counts how many cells contain two different criterias i.e. if a
cell contains Fr as well as B I want it to count but not if it contains one
or the other.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default FORMULAS

=SUM(IF(NOT(ISERROR(FIND("Fr",A1:A10))),IF(NOT(ISE RROR(FIND("B",A1:A10))),1)))
then press Ctrl + Shift + Enter

Charles Chickering

HonorsOA wrote:
What formula counts how many cells contain two different criterias i.e. if a
cell contains Fr as well as B I want it to count but not if it contains one
or the other.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default FORMULAS

Bob Phillips, What a I missing to make this "SumProduct" formula work?
=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10)))),(A1:A10))

Charles

Die_Another_Day wrote:
=SUM(IF(NOT(ISERROR(FIND("Fr",A1:A10))),IF(NOT(ISE RROR(FIND("B",A1:A10))),1)))
then press Ctrl + Shift + Enter

Charles Chickering

HonorsOA wrote:
What formula counts how many cells contain two different criterias i.e. if a
cell contains Fr as well as B I want it to count but not if it contains one
or the other.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default FORMULAS

Nevermind, I was just making it too hard:
=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10)*))))

Charles

Die_Another_Day wrote:
Bob Phillips, What a I missing to make this "SumProduct" formula work?
=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10)))),(A1:A10))

Charles

Die_Another_Day wrote:
=SUM(IF(NOT(ISERROR(FIND("Fr",A1:A10))),IF(NOT(ISE RROR(FIND("B",A1:A10))),1)))
then press Ctrl + Shift + Enter

Charles Chickering

HonorsOA wrote:
What formula counts how many cells contain two different criterias i.e. if a
cell contains Fr as well as B I want it to count but not if it contains one
or the other.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default FORMULAS

DAD,

as an aside, rather than NOT(ISERROR, I use ISNUMBER, makes it a tad more
readable

=SUMPRODUCT((ISNUMBER(FIND("Fr",A1:A10)))*(ISNUMBE R(FIND("B",A1:A10))))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Die_Another_Day" wrote in message
ups.com...
Nevermind, I was just making it too hard:
=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10)*
))))

Charles

Die_Another_Day wrote:
Bob Phillips, What a I missing to make this "SumProduct" formula work?

=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10))
)),(A1:A10))

Charles

Die_Another_Day wrote:

=SUM(IF(NOT(ISERROR(FIND("Fr",A1:A10))),IF(NOT(ISE RROR(FIND("B",A1:A10))),1)
))
then press Ctrl + Shift + Enter

Charles Chickering

HonorsOA wrote:
What formula counts how many cells contain two different criterias

i.e. if a
cell contains Fr as well as B I want it to count but not if it

contains one
or the other.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default FORMULAS

Sweet! Thanks, I thought I had to use ISERROR to keep the formula from
returning an error. This is going to save me alot of negating.

Thanks again,

Charles
Bob Phillips wrote:
DAD,

as an aside, rather than NOT(ISERROR, I use ISNUMBER, makes it a tad more
readable

=SUMPRODUCT((ISNUMBER(FIND("Fr",A1:A10)))*(ISNUMBE R(FIND("B",A1:A10))))

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Die_Another_Day" wrote in message
ups.com...
Nevermind, I was just making it too hard:
=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10)*
))))

Charles

Die_Another_Day wrote:
Bob Phillips, What a I missing to make this "SumProduct" formula work?

=SUMPRODUCT((NOT(ISERROR(FIND("Fr",A1:A10))))*(NOT (ISERROR(FIND("B",A1:A10))
)),(A1:A10))

Charles

Die_Another_Day wrote:

=SUM(IF(NOT(ISERROR(FIND("Fr",A1:A10))),IF(NOT(ISE RROR(FIND("B",A1:A10))),1)
))
then press Ctrl + Shift + Enter

Charles Chickering

HonorsOA wrote:
What formula counts how many cells contain two different criterias

i.e. if a
cell contains Fr as well as B I want it to count but not if it

contains one
or the other.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default FORMULAS

if order isn't important

=COUNTIF(A1:A10,"*Fr*B*")+COUNTIF(A1:A10,"*B*Fr*")

if it is always Fr then B

=COUNTIF(A1:A10,"*Fr*B*")

In the first case, it could be inaccurate if you have BFRB as an
example.

--
Regards,
Tom Ogilvy


"HonorsOA" wrote:

What formula counts how many cells contain two different criterias i.e. if a
cell contains Fr as well as B I want it to count but not if it contains one
or the other.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default FORMULAS

you could always get silly <g

=SUM(COUNTIF(A1:A10,{"*Fr*B*","*B*Fr*"})-COUNTIF(A1:A10,{"*B*Fr*B*","*Fr*B*F
r*"})*2)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Tom Ogilvy" wrote in message
...
if order isn't important

=COUNTIF(A1:A10,"*Fr*B*")+COUNTIF(A1:A10,"*B*Fr*")

if it is always Fr then B

=COUNTIF(A1:A10,"*Fr*B*")

In the first case, it could be inaccurate if you have BFRB as an
example.

--
Regards,
Tom Ogilvy


"HonorsOA" wrote:

What formula counts how many cells contain two different criterias i.e.

if a
cell contains Fr as well as B I want it to count but not if it contains

one
or the other.



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
Convert Array Formulas to Regular Formulas Domenick Excel Worksheet Functions 6 August 17th 15 09:16 PM
Convert Array Formulas to Regular Formulas minyeh Excel Worksheet Functions 0 March 21st 10 05:55 AM
Counting # of Formulas in a column with formulas and entered data Brand Excel Worksheet Functions 1 October 10th 09 01:01 PM
CELLS NOT CALC FORMULAS - VALUES STAY SME FORMULAS CORRECT?? HELP Sherberg Excel Worksheet Functions 4 September 11th 07 01:34 AM
AdvancedFilter on cells with formulas, returning values and not formulas Claus[_3_] Excel Programming 2 September 7th 05 02:40 PM


All times are GMT +1. The time now is 07:16 PM.

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"