PC Review


Reply
Thread Tools Rate Thread

COUNTIF quiestion

 
 
digitallifeform
Guest
Posts: n/a
 
      17th Oct 2003
Wondering if you could help, I am automating sales stats at the moment,
and am currently using:

=COUNTIF(N1:N500,"SJP")

Which works fine, however the field I am asking it to search can be one
of two things, the "SJP" or "SJP/MBL" and I need it to check for both,
I have tried:

=COUNTIF(N1:N500,"SJP""SJP/MBL")
=COUNTIF(N1:N500,"SJP","SJP/MBL")

Which both don't work - how do I get it to do an 'or' function?

Any help would be appreciated.

Thanks



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

 
Reply With Quote
 
 
 
 
Harald Staff
Guest
Posts: n/a
 
      17th Oct 2003
=COUNTIF(N1:N500,"SJP")+COUNTIF(N1:N500,"SJP/MBL")

--
HTH. Best wishes Harald
Followup to newsgroup only please

"digitallifeform" <(E-Mail Removed)> skrev i
melding news:(E-Mail Removed)...
> Wondering if you could help, I am automating sales stats at the moment,
> and am currently using:
>
> =COUNTIF(N1:N500,"SJP")
>
> Which works fine, however the field I am asking it to search can be one
> of two things, the "SJP" or "SJP/MBL" and I need it to check for both,
> I have tried:
>
> =COUNTIF(N1:N500,"SJP""SJP/MBL")
> =COUNTIF(N1:N500,"SJP","SJP/MBL")
>
> Which both don't work - how do I get it to do an 'or' function?
>
> Any help would be appreciated.
>
> Thanks
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>



 
Reply With Quote
 
Alan Beban
Guest
Posts: n/a
 
      17th Oct 2003
=COUNTIF(N1:N500,"*SJP*")

aLAN bEBAN

digitallifeform wrote:
> Wondering if you could help, I am automating sales stats at the moment,
> and am currently using:
>
> =COUNTIF(N1:N500,"SJP")
>
> Which works fine, however the field I am asking it to search can be one
> of two things, the "SJP" or "SJP/MBL" and I need it to check for both,
> I have tried:
>
> =COUNTIF(N1:N500,"SJP""SJP/MBL")
> =COUNTIF(N1:N500,"SJP","SJP/MBL")
>
> Which both don't work - how do I get it to do an 'or' function?
>
> Any help would be appreciated.
>
> Thanks
>
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~ View and post usenet messages directly from http://www.ExcelForum.com/
>


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      18th Oct 2003
On Fri, 17 Oct 2003 08:41:16 -0700, Alan Beban <(E-Mail Removed)>
wrote:

>=COUNTIF(N1:N500,"*SJP*")
>
>aLAN bEBAN


That works so long as if the field contains SJP, it will only contain either
SJP or SJP/MBL. However, if there are other SJP containing fields, than the
formula fails.


--ron
 
Reply With Quote
 
Alan Beban
Guest
Posts: n/a
 
      18th Oct 2003
The OP said:

the field I am asking it to search can be one
of two things, the "SJP" or "SJP/MBL"

Alan Beban

Ron Rosenfeld wrote:
> On Fri, 17 Oct 2003 08:41:16 -0700, Alan Beban <(E-Mail Removed)>
> wrote:
>
>
>>=COUNTIF(N1:N500,"*SJP*")
>>
>>aLAN bEBAN

>
>
> That works so long as if the field contains SJP, it will only contain either
> SJP or SJP/MBL. However, if there are other SJP containing fields, than the
> formula fails.
>
>
> --ron


 
Reply With Quote
 
Harald Staff
Guest
Posts: n/a
 
      18th Oct 2003
> >>=COUNTIF(N1:N500,"*SJP*")

> > However, if there are other SJP containing fields, than the
> > formula fails.


> The OP said:
> the field I am asking it to search can be one
> of two things, the "SJP" or "SJP/MBL"


If those two are the only values present, why COUNTIF at all ??? <bg>
Best wishes Harald


 
Reply With Quote
 
Alan Beban
Guest
Posts: n/a
 
      18th Oct 2003
"Ours not to reason why . . . ."

Alan Beban

Harald Staff wrote:
>>>>=COUNTIF(N1:N500,"*SJP*")
>>>

>
>>>However, if there are other SJP containing fields, than the
>>>formula fails.

>>

>
>>The OP said:
>>the field I am asking it to search can be one
>>of two things, the "SJP" or "SJP/MBL"

>
>
> If those two are the only values present, why COUNTIF at all ??? <bg>
> Best wishes Harald
>
>


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      18th Oct 2003
On Fri, 17 Oct 2003 22:14:36 -0700, Alan Beban <(E-Mail Removed)>
wrote:

>The OP said:
>
> the field I am asking it to search can be one
> of two things, the "SJP" or "SJP/MBL"



Well then, if that's all it could be:
=COUNT(N1:N500)

would be even simpler.


--ron
 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      18th Oct 2003
On Fri, 17 Oct 2003 22:14:36 -0700, Alan Beban <(E-Mail Removed)>
wrote:

>The OP said:
>
> the field I am asking it to search can be one
> of two things, the "SJP" or "SJP/MBL"


Well, simpler would be:
=COUNT(N1:N500)
=ROW(N500)
=500

<g>


--ron
 
Reply With Quote
 
Harald Staff
Guest
Posts: n/a
 
      19th Oct 2003
"Ron Rosenfeld" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> =500
> <g>


Equal sign does what ? <bg>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Core Mainboard Quiestion Harkhof AMD 64 Bit 14 14th Mar 2006 03:18 AM
How do I use a countif function according to two other countif fu. =?Utf-8?B?S2lyc3R5?= Microsoft Excel Worksheet Functions 2 20th Feb 2006 11:44 AM
COUNTIF or not to COUNTIF on a range in another sheet =?Utf-8?B?RWxsaWU=?= Microsoft Excel Worksheet Functions 4 15th Sep 2005 10:06 PM
controls quiestion Nikolay Petrov Microsoft VB .NET 5 14th Dec 2004 02:35 PM
Progress bar quiestion Nikolay Petrov Microsoft VB .NET 2 9th Dec 2004 02:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:02 PM.