Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 111
Default Excel If statement that is supposed to return a "" instead returns

I have a guess; it was predicated on the option to show zero values being on
a sheet-by-sheet basis, and after some testing, this does appear to be the
case. I am guessing that the referenced cells that are returning 0 are in
actuality 0, but that in tools-options-view, zero values has been unchecked.
If this is the case, try changing the formula to:

If(QuerySheet!A1=0,"",QuerySheet!A1)

--
Kevin Vaughn


"omalleyman" wrote:

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.


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
How do I stop graphs reading zero in Excel from cells with ""? ThomasStudd Charts and Charting in Excel 2 September 28th 06 04:11 PM
How do I stop graphs reading zero in Excel from cells with ""? ThomasStudd Excel Worksheet Functions 3 September 27th 06 07:29 PM
Return Excel IF statement to a different worksheet? addme99 Excel Discussion (Misc queries) 1 December 15th 05 04:09 PM
Excel worksheet function that will return the currency for a cell funmi_Bash Excel Worksheet Functions 2 August 15th 05 09:17 AM
Carriage Return in Excel Rod Behr Excel Discussion (Misc queries) 4 December 14th 04 01:53 PM


All times are GMT +1. The time now is 07:46 AM.

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"