PC Review


Reply
Thread Tools Rate Thread

Countif formula - simplify

 
 
benny
Guest
Posts: n/a
 
      12th Sep 2005
Hi
I have a problem to make simple countif formula for more than 1 category.
Suppose I have an array of data in B2:B50 which has value (1 to 9). I want
to count the number of value with categories where the value is equal or
more than 1 and equal or less than 3.
I make the formula
"=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that looks
so long formula.

I want to make it simple with just one countif formula...without "+"
operator.
Highly appreciate for some help

thanks


 
Reply With Quote
 
 
 
 
Max
Guest
Posts: n/a
 
      12th Sep 2005
One way

Try: =SUMPRODUCT((B2:B50>1)*(B2:B50<=3))
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"benny" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> Hi
> I have a problem to make simple countif formula for more than 1 category.
> Suppose I have an array of data in B2:B50 which has value (1 to 9). I want
> to count the number of value with categories where the value is equal or
> more than 1 and equal or less than 3.
> I make the formula
> "=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that looks
> so long formula.
>
> I want to make it simple with just one countif formula...without "+"
> operator.
> Highly appreciate for some help
>
> thanks



 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      12th Sep 2005
=SUMPRODUCT((B2:B50={"1","2","3"})+0)

if integer strings as you show.

--
HTH

Bob Phillips

"benny" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi
> I have a problem to make simple countif formula for more than 1 category.
> Suppose I have an array of data in B2:B50 which has value (1 to 9). I want
> to count the number of value with categories where the value is equal or
> more than 1 and equal or less than 3.
> I make the formula
> "=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that looks
> so long formula.
>
> I want to make it simple with just one countif formula...without "+"
> operator.
> Highly appreciate for some help
>
> thanks
>
>



 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      12th Sep 2005
On Mon, 12 Sep 2005 16:41:58 +0700, "benny" <(E-Mail Removed)> wrote:

>Hi
>I have a problem to make simple countif formula for more than 1 category.
>Suppose I have an array of data in B2:B50 which has value (1 to 9). I want
>to count the number of value with categories where the value is equal or
>more than 1 and equal or less than 3.
>I make the formula
>"=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that looks
>so long formula.
>
>I want to make it simple with just one countif formula...without "+"
>operator.
>Highly appreciate for some help
>
>thanks
>


=COUNTIF(B2:B50,">=1") - COUNTIF(B2:B50,">3")


--ron
 
Reply With Quote
 
Tom Ogilvy
Guest
Posts: n/a
 
      12th Sep 2005
=SUM(COUNTIF(B2:B50,{1,2,3}))

--
Regards,
Tom Ogilvy

"benny" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi
> I have a problem to make simple countif formula for more than 1 category.
> Suppose I have an array of data in B2:B50 which has value (1 to 9). I want
> to count the number of value with categories where the value is equal or
> more than 1 and equal or less than 3.
> I make the formula
> "=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that looks
> so long formula.
>
> I want to make it simple with just one countif formula...without "+"
> operator.
> Highly appreciate for some help
>
> thanks
>
>



 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      12th Sep 2005
Oops, missed out 1 equal sign, should be:
=SUMPRODUCT((B2:B50>=1)*(B2:B50<=3))
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--


 
Reply With Quote
 
benny
Guest
Posts: n/a
 
      13th Sep 2005
It works..great, many thanks for the idea.

\benny

"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> =SUM(COUNTIF(B2:B50,{1,2,3}))
>
> --
> Regards,
> Tom Ogilvy
>
> "benny" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > Hi
> > I have a problem to make simple countif formula for more than 1

category.
> > Suppose I have an array of data in B2:B50 which has value (1 to 9). I

want
> > to count the number of value with categories where the value is equal or
> > more than 1 and equal or less than 3.
> > I make the formula
> > "=Countif(B2:B50,"1")+Countif(B2:B50,"2")+Countif(B2:B50,"3")...that

looks
> > so long formula.
> >
> > I want to make it simple with just one countif formula...without "+"
> > operator.
> > Highly appreciate for some help
> >
> > thanks
> >
> >

>
>



 
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
Simplify this formula Sampoerna Microsoft Excel Worksheet Functions 8 1st Mar 2009 12:24 PM
Simplify Formula Mike Lewis Microsoft Excel Worksheet Functions 1 4th Jul 2008 02:00 AM
simplify formula Gary Keramidas Microsoft Excel Programming 7 25th Oct 2006 12:31 AM
Simplify formula =?Utf-8?B?dGp0amp0anQ=?= Microsoft Excel Worksheet Functions 5 23rd Sep 2006 02:25 PM
simplify this formula =?Utf-8?B?RGF2ZSBG?= Microsoft Excel Worksheet Functions 5 7th Aug 2006 10:35 PM


Features
 

Advertising
 

Newsgroups
 


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