+ Reply to Thread
Results 1 to 12 of 12

IF formula that changes both negative numbers and errors

  1. #1
    Registered User
    Join Date
    02-21-2019
    Location
    Philadelphia
    MS-Off Ver
    Office 2016
    Posts
    48

    IF formula that changes both negative numbers and errors

    Def a confusing title, but basically I've got a column that is calculating days between two dates. I'm looking for an IF function that will render negative cells to "N/A" and error cells to "Evergreen". I was easily able to use an IFERROR function to render the blanks, but I do not know how to change negative numbers nor how to combine with an IFERROR function.

    Any help is greatly appreciated. Thanks

  2. #2
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: IF formula that changes both negative numbers and errors

    if(iserror(value),"evergreen",if(value<0,#N/A,value))

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,697

    Re: IF formula that changes both negative numbers and errors

    you could use something like =IF(cell<0,"N/A"... but it might be easier to see what the formula is you are using and what you want as the output. Even a small sample file would be helpful.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: IF formula that changes both negative numbers and errors

    Quote Originally Posted by templeowls View Post
    Def a confusing title,
    If you find yourself that the title is confusing, why don't you attach a file? You would most probably already have gotten the answer...

  5. #5
    Registered User
    Join Date
    02-21-2019
    Location
    Philadelphia
    MS-Off Ver
    Office 2016
    Posts
    48

    Re: IF formula that changes both negative numbers and errors

    I cannot post a sample file or else I would have. Anytime I press the attachment button, I get small narrow, empty rectangle. Not quite sure what that is about; maybe too new of a user?

    Anyway I'm using the following formula to calculate the days between dates:

    Please Login or Register  to view this content.
    B1 is the date, minus Today. As I stated above, I'm already able to show errors as "Evergreen", just not sure how to show negative days as "N/A" as well

  6. #6
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: IF formula that changes both negative numbers and errors

    Click the " Go advanced " button - Manage attachments and follow the wizard. Forgot to mention the paperclip icon is OOO

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2504
    Posts
    13,631

    Re: IF formula that changes both negative numbers and errors

    Try
    =IF(TODAY>B1,NA,IFERROR(B1-TODAY(),"Evergreen"))

  8. #8
    Registered User
    Join Date
    02-21-2019
    Location
    Philadelphia
    MS-Off Ver
    Office 2016
    Posts
    48

    Re: IF formula that changes both negative numbers and errors

    Sweet thanks, see attached. The formula you sent doesn't seem to be working for me. Getting a #NAME error
    Attached Files Attached Files

  9. #9
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,697

    Re: IF formula that changes both negative numbers and errors

    are you saying you want the output of a positive number to be the word evergreen and the output to be N/A if it is a negative number OR do you want a number as the output for positive and a N/A for a negative number?

  10. #10
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,697

    Re: IF formula that changes both negative numbers and errors

    BTW, if you are using Pepe's formula in post #7 you need to add parens to the first TODAY like this... =IF(TODAY()>B1,"NA",IFERROR(B1-TODAY(),"Evergreen"))
    AND "" around the N/A.
    Last edited by Sam Capricci; 06-26-2019 at 09:51 AM.

  11. #11
    Registered User
    Join Date
    02-21-2019
    Location
    Philadelphia
    MS-Off Ver
    Office 2016
    Posts
    48

    Re: IF formula that changes both negative numbers and errors

    That did the trick!! Thanks Sambo and Pepe!!!

  12. #12
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,697

    Re: IF formula that changes both negative numbers and errors

    You're welcome, and if that takes care of your question don't forget to mark the post as solved using the thread tools dropdown at the top of the post.
    and BTW, I got my MBA from Temple University.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. negative numbers to zero within formula
    By lenoble22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-13-2016, 07:28 PM
  2. Replies: 1
    Last Post: 02-06-2013, 10:32 AM
  3. [SOLVED] Negative numbers in an IF formula
    By mmctague in forum Excel General
    Replies: 6
    Last Post: 06-01-2012, 05:00 PM
  4. ###### errors with Negative [h]:mm numbers
    By Speshul in forum Excel General
    Replies: 3
    Last Post: 03-14-2012, 10:05 AM
  5. Replies: 5
    Last Post: 05-12-2009, 04:47 PM
  6. Negative numbers in an IF formula
    By TammyS in forum Excel Formulas & Functions
    Replies: 19
    Last Post: 07-20-2006, 04:30 PM
  7. [SOLVED] Excel Formula - Add column of numbers but ignore negative numbers
    By view for Distribution List members in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-06-2006, 10:20 PM

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