+ Reply to Thread
Results 1 to 6 of 6

Formula returns "0"; How do I make it return nothing?

  1. #1
    Registered User
    Join Date
    04-18-2006
    Location
    Jackson, MS, USA
    Posts
    9

    Formula returns "0"; How do I make it return nothing?

    It's a very basic formula: it simply returns data from another worksheet in the workbook. However, if no data is entered in the cell a "0" will be inserted in any cell that references it. I tried IF with a space for value_if_true, like so:

    =IF('sheet1!A1'=0, , 'sheet1!A1')

    But that didn't work; it still returned "0". I then tried replacing the space with a non-breaking space (Alt + 0160); that returned an error. Any Ideas?

    ~Jonathan
    \\// Live long and prosper

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187
    try

    =IF('sheet1!A1'=0,"" , 'sheet1!A1')

    regards

  3. #3
    Registered User
    Join Date
    04-18-2006
    Location
    Jackson, MS, USA
    Posts
    9
    tony, it worked beautifully. Thank you very much! I don't know why I didn't post that question here six months ago. I've just been coloring the zeros white. :o)

    Now I have to find another excuse for spending all day with these files.

    ~Jonathan

  4. #4
    Bob Phillips
    Guest

    Re: Formula returns "0"; How do I make it return nothing?

    You could also use a custom format of General;General;

    and then just use

    ='sheet1!A1'

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "jonlandrum" <jonlandrum.26hclm_1145397300.7637@excelforum-nospam.com> wrote
    in message news:jonlandrum.26hclm_1145397300.7637@excelforum-nospam.com...
    >
    > tony, it worked beautifully. Thank you very much! I don't know why I
    > didn't post that question here six months ago. I've just been coloring
    > the zeros white. :o)
    >
    > Now I have to find another excuse for spending all day with these
    > files.
    >
    > ~Jonathan
    >
    >
    > --
    > jonlandrum
    >
    > http://jonlandrum.com/about/
    > ------------------------------------------------------------------------
    > jonlandrum's Profile:

    http://www.excelforum.com/member.php...o&userid=33615
    > View this thread: http://www.excelforum.com/showthread...hreadid=533945
    >




  5. #5
    Registered User
    Join Date
    04-18-2006
    Location
    Jackson, MS, USA
    Posts
    9
    Bob, I didn't think of that, either. However, it wouldn't work because the formating has to be either in date format or dollar format.

  6. #6
    Bob Phillips
    Guest

    Re: Formula returns "0"; How do I make it return nothing?

    You can still use the technique

    Assuming you never get negative dates

    dd/mmm/yyyy;;

    But with currency

    £#,##0.00;-£#,##0.00;

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "jonlandrum" <jonlandrum.26hgrm_1145402701.1982@excelforum-nospam.com> wrote
    in message news:jonlandrum.26hgrm_1145402701.1982@excelforum-nospam.com...
    >
    > Bob, I didn't think of that, either. However, it wouldn't work because
    > the formating has to be either in date format or dollar format.
    >
    >
    > --
    > jonlandrum
    >
    > http://jonlandrum.com/about/
    > ------------------------------------------------------------------------
    > jonlandrum's Profile:

    http://www.excelforum.com/member.php...o&userid=33615
    > View this thread: http://www.excelforum.com/showthread...hreadid=533945
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1