Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default ignore cells that are blank

Hello, I am using the following formula to count the number of occurrences of
my data being out of tolerance. My column of data (J46:J522) contains
numbers and blank cells. My upper and lower tolerances are contained in
cells L3 and L4. Therefore this equation is counting the number of data
results less than the lower tolerance and higher than the high tolerance.
This formula works great when L3 and L4 are bilateral (i.e. +/-.001). But a
problem arises when L3 and L4 are unilateral (i.e. +.001/+.002). This is
because the formula is treating blank cells as 0.

Is there a way to make this formula ignore the blank cells?

{=SUM(IF((J46:J522<L4)+(J46:J522L3),1,0))}
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default ignore cells that are blank

Try this (normally entered):

=SUMPRODUCT(--(J46:J522<""),--(J46:J522L3),--(J46:J522<L4))

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Hello, I am using the following formula to count the number of occurrences
of
my data being out of tolerance. My column of data (J46:J522) contains
numbers and blank cells. My upper and lower tolerances are contained in
cells L3 and L4. Therefore this equation is counting the number of data
results less than the lower tolerance and higher than the high tolerance.
This formula works great when L3 and L4 are bilateral (i.e. +/-.001). But
a
problem arises when L3 and L4 are unilateral (i.e. +.001/+.002). This is
because the formula is treating blank cells as 0.

Is there a way to make this formula ignore the blank cells?

{=SUM(IF((J46:J522<L4)+(J46:J522L3),1,0))}



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default ignore cells that are blank

For some reason your equation returns a value of zero always, regardless of
what numbers I have in L3 and L4. Do you know why this might happen?


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 193
Default ignore cells that are blank

Interestingly, this one DOES work:

=SUMPRODUCT(--(J46:J522<""),--(J46:J522<L4))+SUMPRODUCT(--(J46:J522<""),--(J46:J522L3))

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default ignore cells that are blank

Your array formula is written as an "or" conditional test.

J46:J522<L4 OR J46:J522L3

The formula I suggested is written as an "and" conditional test:

J46:J522L3 AND J46:J522<L4

The formula that you got to work is essentially the same as the "or" version
but it's spread across two separate functions.

This one will do the same thing:

=SUMPRODUCT(--(J46:J522<""),--((J46:J522<L4)+(J46:J522L3)0))

--
Biff
Microsoft Excel MVP


"Robert" wrote in message
...
Interestingly, this one DOES work:

=SUMPRODUCT(--(J46:J522<""),--(J46:J522<L4))+SUMPRODUCT(--(J46:J522<""),--(J46:J522L3))



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
Ignore Blank or 0 cells Dave Excel Worksheet Functions 4 August 20th 08 12:06 AM
Ignore blank cells Angyl Excel Discussion (Misc queries) 4 October 30th 07 09:42 PM
ignore blank cells Leticia Excel Discussion (Misc queries) 3 February 27th 06 05:41 PM
How to ignore blank cells MattBeckwith Charts and Charting in Excel 10 February 19th 06 11:16 PM
how do you ignore blank cells Kerry Excel Discussion (Misc queries) 1 February 16th 05 01:55 PM


All times are GMT +1. The time now is 05:34 PM.

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"