PC Review


Reply
Thread Tools Rate Thread

countif both conditions in a row of 2 cells exists

 
 
=?Utf-8?B?bmV3Ymll?=
Guest
Posts: n/a
 
      15th Jul 2006
example of what I'm trying to do:
"if the number in G6 is <800 and H6 is >=20 then count the row as 1"
 
Reply With Quote
 
 
 
 
RagDyeR
Guest
Posts: n/a
 
      15th Jul 2006
Try this:

=(G6<800)*(H6>=20)

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================

"newbie" <(E-Mail Removed)> wrote in message
news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
example of what I'm trying to do:
"if the number in G6 is <800 and H6 is >=20 then count the row as 1"


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      15th Jul 2006
=sumproduct(--(g1:g999<800),--(h1:h999>=20))

Adjust the ranges to match--but you can't use whole columns.

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail here:
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

newbie wrote:
>
> example of what I'm trying to do:
> "if the number in G6 is <800 and H6 is >=20 then count the row as 1"


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?bmV3Ymll?=
Guest
Posts: n/a
 
      15th Jul 2006
That works Great! Now how could this be done with a range. For example,
looking at each 2 cell row in a range and counting as 1 only if both
condition exist.
G6:G29 <800 and H6:H29>=20

"RagDyeR" wrote:

> Try this:
>
> =(G6<800)*(H6>=20)
>
> --
>
> HTH,
>
> RD
> =====================================================
> Please keep all correspondence within the Group, so all may benefit!
> =====================================================
>
> "newbie" <(E-Mail Removed)> wrote in message
> news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> example of what I'm trying to do:
> "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
>
>
>

 
Reply With Quote
 
RagDyeR
Guest
Posts: n/a
 
      15th Jul 2006
Then just use what Dave posted.

His formula will total over a range.
Follow his instructions to adjust the ranges he used to the ranges you are
using.
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

"newbie" <(E-Mail Removed)> wrote in message
news:34F723F7-0460-443B-9755-(E-Mail Removed)...
That works Great! Now how could this be done with a range. For example,
looking at each 2 cell row in a range and counting as 1 only if both
condition exist.
G6:G29 <800 and H6:H29>=20

"RagDyeR" wrote:

> Try this:
>
> =(G6<800)*(H6>=20)
>
> --
>
> HTH,
>
> RD
> =====================================================
> Please keep all correspondence within the Group, so all may benefit!
> =====================================================
>
> "newbie" <(E-Mail Removed)> wrote in message
> news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> example of what I'm trying to do:
> "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
>
>
>



 
Reply With Quote
 
=?Utf-8?B?bmV3Ymll?=
Guest
Posts: n/a
 
      15th Jul 2006
I've tried it. Can't get it to work

"RagDyeR" wrote:

> Then just use what Dave posted.
>
> His formula will total over a range.
> Follow his instructions to adjust the ranges he used to the ranges you are
> using.
> --
>
> Regards,
>
> RD
> ----------------------------------------------------------------------------
> -------------------
> Please keep all correspondence within the Group, so all may benefit !
> ----------------------------------------------------------------------------
> -------------------
>
> "newbie" <(E-Mail Removed)> wrote in message
> news:34F723F7-0460-443B-9755-(E-Mail Removed)...
> That works Great! Now how could this be done with a range. For example,
> looking at each 2 cell row in a range and counting as 1 only if both
> condition exist.
> G6:G29 <800 and H6:H29>=20
>
> "RagDyeR" wrote:
>
> > Try this:
> >
> > =(G6<800)*(H6>=20)
> >
> > --
> >
> > HTH,
> >
> > RD
> > =====================================================
> > Please keep all correspondence within the Group, so all may benefit!
> > =====================================================
> >
> > "newbie" <(E-Mail Removed)> wrote in message
> > news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> > example of what I'm trying to do:
> > "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
> >
> >
> >

>
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      15th Jul 2006
Post what you tried.

newbie wrote:
>
> I've tried it. Can't get it to work
>
> "RagDyeR" wrote:
>
> > Then just use what Dave posted.
> >
> > His formula will total over a range.
> > Follow his instructions to adjust the ranges he used to the ranges you are
> > using.
> > --
> >
> > Regards,
> >
> > RD
> > ----------------------------------------------------------------------------
> > -------------------
> > Please keep all correspondence within the Group, so all may benefit !
> > ----------------------------------------------------------------------------
> > -------------------
> >
> > "newbie" <(E-Mail Removed)> wrote in message
> > news:34F723F7-0460-443B-9755-(E-Mail Removed)...
> > That works Great! Now how could this be done with a range. For example,
> > looking at each 2 cell row in a range and counting as 1 only if both
> > condition exist.
> > G6:G29 <800 and H6:H29>=20
> >
> > "RagDyeR" wrote:
> >
> > > Try this:
> > >
> > > =(G6<800)*(H6>=20)
> > >
> > > --
> > >
> > > HTH,
> > >
> > > RD
> > > =====================================================
> > > Please keep all correspondence within the Group, so all may benefit!
> > > =====================================================
> > >
> > > "newbie" <(E-Mail Removed)> wrote in message
> > > news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> > > example of what I'm trying to do:
> > > "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
> > >
> > >
> > >

> >
> >
> >


--

Dave Peterson
 
Reply With Quote
 
=?Utf-8?B?bmV3Ymll?=
Guest
Posts: n/a
 
      15th Jul 2006
tried a few more times. got it to work. Been looking at this thing too long.
Can I do something similar to just use 2 cells to be counted as a row only
if they are not blank?"

"Dave Peterson" wrote:

> Post what you tried.
>
> newbie wrote:
> >
> > I've tried it. Can't get it to work
> >
> > "RagDyeR" wrote:
> >
> > > Then just use what Dave posted.
> > >
> > > His formula will total over a range.
> > > Follow his instructions to adjust the ranges he used to the ranges you are
> > > using.
> > > --
> > >
> > > Regards,
> > >
> > > RD
> > > ----------------------------------------------------------------------------
> > > -------------------
> > > Please keep all correspondence within the Group, so all may benefit !
> > > ----------------------------------------------------------------------------
> > > -------------------
> > >
> > > "newbie" <(E-Mail Removed)> wrote in message
> > > news:34F723F7-0460-443B-9755-(E-Mail Removed)...
> > > That works Great! Now how could this be done with a range. For example,
> > > looking at each 2 cell row in a range and counting as 1 only if both
> > > condition exist.
> > > G6:G29 <800 and H6:H29>=20
> > >
> > > "RagDyeR" wrote:
> > >
> > > > Try this:
> > > >
> > > > =(G6<800)*(H6>=20)
> > > >
> > > > --
> > > >
> > > > HTH,
> > > >
> > > > RD
> > > > =====================================================
> > > > Please keep all correspondence within the Group, so all may benefit!
> > > > =====================================================
> > > >
> > > > "newbie" <(E-Mail Removed)> wrote in message
> > > > news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> > > > example of what I'm trying to do:
> > > > "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
> > > >
> > > >
> > > >
> > >
> > >
> > >

>
> --
>
> Dave Peterson
>

 
Reply With Quote
 
RagDyeR
Guest
Posts: n/a
 
      15th Jul 2006
I don't understand what you're trying to say.
--

Regards,

RD
----------------------------------------------------------------------------
-------------------
Please keep all correspondence within the Group, so all may benefit !
----------------------------------------------------------------------------
-------------------

"newbie" <(E-Mail Removed)> wrote in message
news:0DB91234-73EF-40E5-A50D-(E-Mail Removed)...
tried a few more times. got it to work. Been looking at this thing too long.
Can I do something similar to just use 2 cells to be counted as a row only
if they are not blank?"

"Dave Peterson" wrote:

> Post what you tried.
>
> newbie wrote:
> >
> > I've tried it. Can't get it to work
> >
> > "RagDyeR" wrote:
> >
> > > Then just use what Dave posted.
> > >
> > > His formula will total over a range.
> > > Follow his instructions to adjust the ranges he used to the ranges you

are
> > > using.
> > > --
> > >
> > > Regards,
> > >
> > > RD

> >

> --------------------------------------------------------------------------

--
> > > -------------------
> > > Please keep all correspondence within the Group, so all may benefit !

> >

> --------------------------------------------------------------------------

--
> > > -------------------
> > >
> > > "newbie" <(E-Mail Removed)> wrote in message
> > > news:34F723F7-0460-443B-9755-(E-Mail Removed)...
> > > That works Great! Now how could this be done with a range. For

example,
> > > looking at each 2 cell row in a range and counting as 1 only if both
> > > condition exist.
> > > G6:G29 <800 and H6:H29>=20
> > >
> > > "RagDyeR" wrote:
> > >
> > > > Try this:
> > > >
> > > > =(G6<800)*(H6>=20)
> > > >
> > > > --
> > > >
> > > > HTH,
> > > >
> > > > RD
> > > > =====================================================
> > > > Please keep all correspondence within the Group, so all may benefit!
> > > > =====================================================
> > > >
> > > > "newbie" <(E-Mail Removed)> wrote in message
> > > > news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> > > > example of what I'm trying to do:
> > > > "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
> > > >
> > > >
> > > >
> > >
> > >
> > >

>
> --
>
> Dave Peterson
>



 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      15th Jul 2006
maybe...

=sumproduct(--(g1:g999<>""),--(h1:h999<>""))

But this will treat formulas that return "" as "blank".

newbie wrote:
>
> tried a few more times. got it to work. Been looking at this thing too long.
> Can I do something similar to just use 2 cells to be counted as a row only
> if they are not blank?"
>
> "Dave Peterson" wrote:
>
> > Post what you tried.
> >
> > newbie wrote:
> > >
> > > I've tried it. Can't get it to work
> > >
> > > "RagDyeR" wrote:
> > >
> > > > Then just use what Dave posted.
> > > >
> > > > His formula will total over a range.
> > > > Follow his instructions to adjust the ranges he used to the ranges you are
> > > > using.
> > > > --
> > > >
> > > > Regards,
> > > >
> > > > RD
> > > > ----------------------------------------------------------------------------
> > > > -------------------
> > > > Please keep all correspondence within the Group, so all may benefit !
> > > > ----------------------------------------------------------------------------
> > > > -------------------
> > > >
> > > > "newbie" <(E-Mail Removed)> wrote in message
> > > > news:34F723F7-0460-443B-9755-(E-Mail Removed)...
> > > > That works Great! Now how could this be done with a range. For example,
> > > > looking at each 2 cell row in a range and counting as 1 only if both
> > > > condition exist.
> > > > G6:G29 <800 and H6:H29>=20
> > > >
> > > > "RagDyeR" wrote:
> > > >
> > > > > Try this:
> > > > >
> > > > > =(G6<800)*(H6>=20)
> > > > >
> > > > > --
> > > > >
> > > > > HTH,
> > > > >
> > > > > RD
> > > > > =====================================================
> > > > > Please keep all correspondence within the Group, so all may benefit!
> > > > > =====================================================
> > > > >
> > > > > "newbie" <(E-Mail Removed)> wrote in message
> > > > > news:977D2AAA-347C-4954-9F6A-(E-Mail Removed)...
> > > > > example of what I'm trying to do:
> > > > > "if the number in G6 is <800 and H6 is >=20 then count the row as 1"
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > >

> >
> > --
> >
> > Dave Peterson
> >


--

Dave Peterson
 
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
Countif with two conditions and cells one a number and other text Frank Alonso Microsoft Excel Misc 2 26th May 2009 11:34 PM
Countif with two conditions and cells one a number and other text Frank Alonso Microsoft Excel Misc 0 26th May 2009 11:09 PM
Countif Conditions - Use of conditions that vary by cell value JonTarg Microsoft Excel Misc 1 30th May 2008 01:21 PM
shade cells based on conditions - i have more than 3 conditions =?Utf-8?B?TW8y?= Microsoft Excel Worksheet Functions 3 30th Mar 2007 07:19 AM
I Want To Use Countif With 2 Conditions JAYDE Microsoft Excel Worksheet Functions 1 10th Sep 2003 09:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:59 AM.