View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004 joeu2004 is offline
external usenet poster
 
Posts: 2,059
Default How do get the LOOKUP function to not read empty cells as zeros

"Shane Devenshire" wrote:
=IF(A1=0,1,IF(A1=1,0,""))


Returns 1 when A1 is empty. But the OP wrote: "When the reference cell is
empty, I'd like the function to also return an empty cell".

Of course, a formula cannot "return an empty cell". But it can return a
null string.


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

"Shane Devenshire" wrote in
message ...
Hi,

why are you using lookup?

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


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"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.