View Single Post
  #7   Report Post  
Max
 
Posts: n/a
Default


...
But bewa the cell with this IF() function will no longer
be treated as zero if it is blank.


Yes, of course. And this may affect downstream calculations reading these
cells as you rightly pointed out. OTOH, we could also do it as:
=IF(Sheet2!A1="",0,Sheet2!A1), and then switch off the zeros display in the
sheet <g.

To achieve a cleaner view, I'd usually just go for the option of switching
off the zero values display in the sheet, and leave the link formula as it
stands, w/o the error trap.

If there is an option to treat the null string as an empty
cell -- or to treat any string as zero in an arithmetic
expression -- I would like to hear about it.


An example could be to use SUM() to avert downstream arithmetic errors,
since SUM seems to treat null strings/text as zeros:

Using : =SUM(A1:B1) instead of: =A1+B1
Using : =SUM(B1)-SUM(A1) instead of: =B1-A1

Believe the 1st expression is quite commonly used,
while the 2nd is probably not (it's just an example)
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----