Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default countif both conditions in a row of 2 cells exists

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"
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default countif both conditions in a row of 2 cells exists

Try this:

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

--

HTH,

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

"newbie" wrote in message
...
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"


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default countif both conditions in a row of 2 cells exists

=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 he
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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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"



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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" wrote in message
...
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"







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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" wrote in message
...
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"






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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" wrote in message
...
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
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 137
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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" wrote in message
...
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

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default countif both conditions in a row of 2 cells exists

I don't understand what you're trying to say.
--

Regards,

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

"newbie" wrote in message
...
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" wrote in message
...
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" wrote in message
...
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



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default countif both conditions in a row of 2 cells exists

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" wrote in message
...
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" wrote in message
...
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
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
Format cells with a formula (7 conditions). danindenver Excel Discussion (Misc queries) 3 January 2nd 06 02:40 PM
COUNTIF temporarily missed some cells dstx Excel Worksheet Functions 0 July 18th 05 08:42 PM
How do I use countif across non-adjacent cells? Nick Excel Worksheet Functions 2 June 9th 05 03:28 AM
Countif for specific cells rather than a range ???? Renee - California Excel Worksheet Functions 5 May 27th 05 07:09 PM
counting cells (COUNTIF) based on two or more criteria Tricia S. Excel Worksheet Functions 10 March 17th 05 02:17 PM


All times are GMT +1. The time now is 02:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"