Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Countif (like no other)

I looked through the extensive no. of posts on the countif function and
believe that my issue is truly exceptional (but then again maybe not). I
need to count the number of cells that are out of a specific range when the
number in that cell is divided by the number in another cell.

Example:
count the number of cells in range A1:D2 where the number in that cell
divided by the number in A4 is 55 and <45.
A B C D
row 1 150 200 156 250
row 2 141 150 310 408

row 4 3

in this example the answer should be 4.

So far my formula looks like this:
SUM(COUNTIF(C20:O67,"<45"),COUNTIF(C20:O67,"55")) but that does not account
for dividing the numbers by A4.

Hope this is slightly clearer than mud. Thanks for any help.

Holly
  #2   Report Post  
Posted to microsoft.public.excel.misc
dlw dlw is offline
external usenet poster
 
Posts: 510
Default Countif (like no other)

make a "helper column" where you divide the number first then countif on that
column.

"hnyb1" wrote:

I looked through the extensive no. of posts on the countif function and
believe that my issue is truly exceptional (but then again maybe not). I
need to count the number of cells that are out of a specific range when the
number in that cell is divided by the number in another cell.

Example:
count the number of cells in range A1:D2 where the number in that cell
divided by the number in A4 is 55 and <45.
A B C D
row 1 150 200 156 250
row 2 141 150 310 408

row 4 3

in this example the answer should be 4.

So far my formula looks like this:
SUM(COUNTIF(C20:O67,"<45"),COUNTIF(C20:O67,"55")) but that does not account
for dividing the numbers by A4.

Hope this is slightly clearer than mud. Thanks for any help.

Holly

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Countif (like no other)

Your criteria assumption is incorrect, the numbers cannot be both greater
than 55 AND less than 45, you might mean greater than 55 OR less than 45, if
so

=SUMPRODUCT(--((A1:D2/A455)+(A1:D2/A4<45)0),--(A1:D2<""))


to guard against empty cells who are counted as zero, if there can be no
empty cells

=SUMPRODUCT(--((A1:D2/A455)+(A1:D2/A4<45)0))


I haven't really tested it except for the values in your example


--
Regards,

Peo Sjoblom



"hnyb1" wrote in message
...
I looked through the extensive no. of posts on the countif function and
believe that my issue is truly exceptional (but then again maybe not). I
need to count the number of cells that are out of a specific range when
the
number in that cell is divided by the number in another cell.

Example:
count the number of cells in range A1:D2 where the number in that cell
divided by the number in A4 is 55 and <45.
A B C D
row 1 150 200 156 250
row 2 141 150 310 408

row 4 3

in this example the answer should be 4.

So far my formula looks like this:
SUM(COUNTIF(C20:O67,"<45"),COUNTIF(C20:O67,"55")) but that does not
account
for dividing the numbers by A4.

Hope this is slightly clearer than mud. Thanks for any help.

Holly



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Countif (like no other)

Thank you all for your help!

"Peo Sjoblom" wrote:

Your criteria assumption is incorrect, the numbers cannot be both greater
than 55 AND less than 45, you might mean greater than 55 OR less than 45, if
so

=SUMPRODUCT(--((A1:D2/A455)+(A1:D2/A4<45)0),--(A1:D2<""))


to guard against empty cells who are counted as zero, if there can be no
empty cells

=SUMPRODUCT(--((A1:D2/A455)+(A1:D2/A4<45)0))


I haven't really tested it except for the values in your example


--
Regards,

Peo Sjoblom



"hnyb1" wrote in message
...
I looked through the extensive no. of posts on the countif function and
believe that my issue is truly exceptional (but then again maybe not). I
need to count the number of cells that are out of a specific range when
the
number in that cell is divided by the number in another cell.

Example:
count the number of cells in range A1:D2 where the number in that cell
divided by the number in A4 is 55 and <45.
A B C D
row 1 150 200 156 250
row 2 141 150 310 408

row 4 3

in this example the answer should be 4.

So far my formula looks like this:
SUM(COUNTIF(C20:O67,"<45"),COUNTIF(C20:O67,"55")) but that does not
account
for dividing the numbers by A4.

Hope this is slightly clearer than mud. Thanks for any help.

Holly




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
Countif? Helen Excel Worksheet Functions 1 March 7th 07 09:33 PM
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 07:33 AM.

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"