View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
omalleyman omalleyman is offline
external usenet poster
 
Posts: 1
Default Excel If statement that is supposed to return a "" instead returns a 0

I have a If Function that refers to another cell on a different sheet
in the same workbook
the formula is If(QuerySheet!A1="","",QuerySheet!A1)
In other words I check for a null string (empty string) if there is one
it should return an empty string back, if not return the value of the
cell.

The first cell of the column returns a blank cell (empty string as it
is suppose to)
The next cell down returns a 0 instead of the empty string that is
dictated by the formula.

I went into format cells. Both are 'General'. However the "Sample" in
one is empty the other has a 0 as a sample.

I thought the sample might be just returning what ever is in the cell.
So I take out the formula of the cell that is returning a 0 (which I
dont' want). I click on format cells again and the sample given is now
blank. I put in the formula again. It stiil returns the 0.
grrrr..... It seems rather arbitrary. After giving up I completed the
column. All cells worked as the formula dictated if there was a value.
The referred to cells that were blank however returned arbitrarilly a 0
or "". All the referred to cells are formatted the same. All the cells
that contain the functions are formatted General. However, some return
0 others return "". I see no difference.