LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default How do get the LOOKUP function to not read empty cells as zeros

Improvement....

I wrote:
=if(A1="","",if(A1,0,1))


=if(A1="", "", --NOT(A1))


----- original message -----

"JoeU2004" wrote in message
...
"LGriffin" wrote:
I am trying to reverse code 0s and 1s with =LOOKUP (reference cell,
{0,1},{1,0}). When the reference cell is empty, I'd like the function to
also return an empty cell.


=if(A1="","",if(A1,0,1))

treats all non-zero A1 as 1, changing them to 0.

A formula cannot "return an empty cell". It can only make a cell
__appear__ blank by returning a null string.

For that reason, use A1="", not ISBLANK(A1), to test for a blank cell.
ISBLANK() returns true only when the cell is truly empty -- that is, no
formula and no value. A1="" returns true in that case as well as when the
value in A1 is the null string, such as the result of IF() expression like
the above.


 
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
Empty strings appear as zeros Paul Martin[_2_] Charts and Charting in Excel 5 May 9th 08 12:37 AM
pivot tables, calculated fields, empty cells and zeros GPO Excel Discussion (Misc queries) 1 October 26th 07 08:25 PM
pivot tables, calculated fields, empty cells and zeros GPO Excel Discussion (Misc queries) 1 October 19th 07 07:32 AM
Average Function (include Blank Cells and Zeros) [email protected] Excel Discussion (Misc queries) 17 June 27th 06 01:33 PM
Lookup without empty cells. comotoman Excel Discussion (Misc queries) 3 October 4th 05 04:16 PM


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