PDA

View Full Version : If statement



da_phat
05-22-2007, 03:14 AM
Hye there,
just would like to ask several questionr regarding if statement. How can i return a value of "blank" if the reference cell is "0" from the another workshhet. If the cell in the other worksheet contain value, it will return the values else will return "blank"The example are as follows

=if(sheet1!a1=0,"",=sheet1!a1)

many thanks

Charlize
05-22-2007, 03:22 AM
Try this :

=if(sheet1!a1=0,"",sheet1!a1)

Simon Lloyd
05-22-2007, 03:22 AM
I'm not sure what your question is?, if you put this in A1 sheet 1 =IF(Sheet2!A1=0,"",Sheet2!A1) then A1 sheet 1 will display blank if A1 sheet 2 is blank, which is exactly the formula you posted minus the 3rd =!

da_phat
05-22-2007, 03:29 AM
thx a lot. but the cell still give me #DIV/0. For your info the sheet which im referred to have the formula.does it have an affect.

Bob Phillips
05-22-2007, 03:32 AM
=IF(OR(Sheet1!A1=0,Sheet1!A1=""),"",Sheet1!A1)

Simon Lloyd
05-22-2007, 03:46 AM
You didnt say that your formula was looking at a cell that contained a formula that currently shows DIV0#, you need to build in error handling to your formula like this:
=IF(ISERROR(Sheet1!A1=0),"",Sheet1!A1)