Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default difference between blank and zero ....

I have a worksheet in which a formula calculates the fee based on the item price
in an adjacent cell and a lookup table which shows "breakpoints" in the fee
structure.

This works fine with any amount (including 0) in item price, but fails when the
price cell is blank. When blank, the function MIN(price,75) gives a value of 75
rather than 0.

Is this behaviour to be expected? If so, is there an elegant way to handle
cells with a blank value, as having "0.00" all over the sheet is a bit untidy?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default difference between blank and zero ....

On Sat, 06 Dec 2008 12:28:16 +0800, rebel wrote:

I have a worksheet in which a formula calculates the fee based on the item price
in an adjacent cell and a lookup table which shows "breakpoints" in the fee
structure.

This works fine with any amount (including 0) in item price, but fails when the
price cell is blank. When blank, the function MIN(price,75) gives a value of 75
rather than 0.

Is this behaviour to be expected? If so, is there an elegant way to handle
cells with a blank value, as having "0.00" all over the sheet is a bit untidy?



Something like:

=if(ItemPrice="","",YourFormula)
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,805
Default difference between blank and zero ....

Both MIN and MINA functions/formulas ignore BLANKS...

If you want to treat a blank as a zero and get MIN as zero then try
=MIN(IF(A1:A100="",0,A1:A100))

This will convert all blanks to 0 in the range A1:A100 and then pass it to MIN

"Ron Rosenfeld" wrote:

On Sat, 06 Dec 2008 12:28:16 +0800, rebel wrote:

I have a worksheet in which a formula calculates the fee based on the item price
in an adjacent cell and a lookup table which shows "breakpoints" in the fee
structure.

This works fine with any amount (including 0) in item price, but fails when the
price cell is blank. When blank, the function MIN(price,75) gives a value of 75
rather than 0.

Is this behaviour to be expected? If so, is there an elegant way to handle
cells with a blank value, as having "0.00" all over the sheet is a bit untidy?



Something like:

=if(ItemPrice="","",YourFormula)
--ron

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default difference between blank and zero ....

Is this behaviour to be expected?

The difference is in what functions and type of formula you're using. Some
functions evaluate an empty cell as 0 and some functions ignore empty cells.
In the case of MIN, it ignores empty cells unless *all* of the cells
referenced are empty then it will return 0.

How you deal with it depends on the application.

If you want this to return 0 when "price" is empty:

MIN(price,75)

Try it like this

MIN(price*1,75)

--
Biff
Microsoft Excel MVP


"rebel" wrote in message
...
I have a worksheet in which a formula calculates the fee based on the item
price
in an adjacent cell and a lookup table which shows "breakpoints" in the
fee
structure.

This works fine with any amount (including 0) in item price, but fails
when the
price cell is blank. When blank, the function MIN(price,75) gives a value
of 75
rather than 0.

Is this behaviour to be expected? If so, is there an elegant way to
handle
cells with a blank value, as having "0.00" all over the sheet is a bit
untidy?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default difference between blank and zero ....

Clarification:

In the case of MIN, it ignores empty cells unless *all* of the cells
referenced are empty then it will return 0.
MIN(price,75)


Ok, you might think: well, "price" is *all* of the referenced cells so why
doesn't it evaluate as 0?

Because 75 is another argument that isn't an empty referenced cell. So, I
should have said:

....it ignores empty cells unless *all* of the referenced arguments are empty
cells then it will return 0.


--
Biff
Microsoft Excel MVP


"T. Valko" wrote in message
...
Is this behaviour to be expected?


The difference is in what functions and type of formula you're using. Some
functions evaluate an empty cell as 0 and some functions ignore empty
cells. In the case of MIN, it ignores empty cells unless *all* of the
cells referenced are empty then it will return 0.

How you deal with it depends on the application.

If you want this to return 0 when "price" is empty:

MIN(price,75)

Try it like this

MIN(price*1,75)

--
Biff
Microsoft Excel MVP


"rebel" wrote in message
...
I have a worksheet in which a formula calculates the fee based on the item
price
in an adjacent cell and a lookup table which shows "breakpoints" in the
fee
structure.

This works fine with any amount (including 0) in item price, but fails
when the
price cell is blank. When blank, the function MIN(price,75) gives a
value of 75
rather than 0.

Is this behaviour to be expected? If so, is there an elegant way to
handle
cells with a blank value, as having "0.00" all over the sheet is a bit
untidy?







  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default difference between blank and zero ....

On Fri, 5 Dec 2008 23:02:03 -0500, "T. Valko" wrote:

Clarification:

In the case of MIN, it ignores empty cells unless *all* of the cells
referenced are empty then it will return 0.
MIN(price,75)


Ok, you might think: well, "price" is *all* of the referenced cells so why
doesn't it evaluate as 0?

Because 75 is another argument that isn't an empty referenced cell. So, I
should have said:

...it ignores empty cells unless *all* of the referenced arguments are empty
cells then it will return 0.


Thanks, Biff. The "*1" has done the trick.

Each occurrence of the formula references a single target cell (albeit three
times), not a range, so this was the easiest fix.

=ROUND(MIN(E29*1,75)*0.0525+(MIN(925,MAX(E29-75,0)))*0.0275+MAX(E29-1000,0)*0.015,2)

only needed the first term modified.
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default difference between blank and zero ....

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"rebel" wrote in message
...
On Fri, 5 Dec 2008 23:02:03 -0500, "T. Valko"
wrote:

Clarification:

In the case of MIN, it ignores empty cells unless *all* of the cells
referenced are empty then it will return 0.
MIN(price,75)


Ok, you might think: well, "price" is *all* of the referenced cells so why
doesn't it evaluate as 0?

Because 75 is another argument that isn't an empty referenced cell. So, I
should have said:

...it ignores empty cells unless *all* of the referenced arguments are
empty
cells then it will return 0.


Thanks, Biff. The "*1" has done the trick.

Each occurrence of the formula references a single target cell (albeit
three
times), not a range, so this was the easiest fix.

=ROUND(MIN(E29*1,75)*0.0525+(MIN(925,MAX(E29-75,0)))*0.0275+MAX(E29-1000,0)*0.015,2)

only needed the first term modified.



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default difference between blank and zero ....

Ah, the irony. Straight after I posted, I see the other post "Cell is not
blank" - serendipitous.
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
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
subtract the time difference from another time difference Dannigirl Excel Discussion (Misc queries) 3 September 30th 07 03:47 PM
Skipping blank cells when calculating time difference GARDNERGUY Excel Discussion (Misc queries) 3 April 20th 07 06:28 PM
charting a difference of 2 columns' w/o adding a difference column Wab Charts and Charting in Excel 4 July 27th 05 02:37 AM
Telling the difference between zero and blank in IF statement mindfunk Excel Worksheet Functions 1 June 30th 05 06:42 PM


All times are GMT +1. The time now is 06:16 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"