+ Reply to Thread
Results 1 to 5 of 5

formula to return nothing

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    formula to return nothing

    I have lots of workbooks with columns of formulas that depend on each other. I want to keep them neat, so I use a lot of IF-type formulas, like so in column B:
    Please Login or Register  to view this content.
    This looks good, because if the condition isn't satisified, the cell appears empty. But, if in column C, I have a formula adding A and B, if the result of B is "", I get an N/A in column C, because Excel is recognizing that Something is in B, and it's not a number. A workaround for that is to have my IF formula return a Zero, but I often don't want a zero, either. Sure, I can do stuff with conditional formatting to hide the zeros, but what I'd like instead is to have the formula return nothing. How can I do that?

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2012
    Location
    Georgia, USA
    MS-Off Ver
    Excel 2003, 2010
    Posts
    811

    Re: formula to return nothing

    You could always do this:

    Assume
    A1=IF(A2 = 3,A2,"")

    =IF(A1="","",A1+B1)
    Click on star (*) below if this helps

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: formula to return nothing

    A formula always returns something. Instead of adding, you can use SUM which won't give you that error, you could have it return 0 and then format the cell so that it doesn't show zeros.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    London, England
    MS-Off Ver
    2003, 2010
    Posts
    344

    Re: formula to return nothing

    Hello - I also encounter similar situations and the way I resolve this is by using 0 in the If formula and using the custom format [0;-0;;@] for the entire data range (being mindful of any %, currency values etc.) this format of number does not display 0's, the data looks clean and is usable for further analysis.

    Hope this helps.
    If solved kindly remember to mark Thread as solved.
    Click the small star icon at the bottom left of my post if this was useful.

  5. #5
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,952

    Re: formula to return nothing

    Sounds like I'm pretty much just going to have to return the zero and format it away, aren't I? Except that Km has posted a possible way around. Are there others?

+ 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