+ Reply to Thread
Results 1 to 7 of 7

Excel 2007 formula returns negative numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2007
    Posts
    4

    Excel 2007 formula returns negative numbers

    I have a spreadsheet where I am calculating change. =F2-E2 . Sometimes the number in E2 is larger than the number in F2 so it is returned as a negative number. How do I not have the formula return any negative numbers? Or houw do I format the cell to not allow any negative numbers. In another formula, where the result of =F2-E2 is used, the resulting negative number won't work...

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel 2007 formula returns negative numbers

    Hi and welcome to the forum.

    One way is to format the numbers as non negatives.

    Another is Custom Validation, but i think format cell, is OK.

    Hope to helps you.
    Attached Files Attached Files
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    01-06-2012
    Location
    north carolina
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Excel 2007 formula returns negative numbers

    The formula that uses the result of =F2-E2 even recognises the red number as a negative. I've tried all the options for negative numbers in the cell format tool

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Excel 2007 formula returns negative numbers

    Then you can do this.

    If the result of the formula is in I2(FOR EXAMPLE)

    In the other formula that use the result(example =I2+50+20), do this.

    =if(i2<0;(-i2+50+20);i2+50+20

    Hope to helps you.
    Attached Files Attached Files

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Excel 2007 formula returns negative numbers

    Use
    PHP Code: 
    Abs(F2-F1



  6. #6
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Excel 2007 formula returns negative numbers

    You could use an IF formula. Adjust to suit
    =IF(OR(E2="",F2=""),"",IF(E2<F2,F2-E2,IF(E2>F2,E2-F2,"")))
    It would give you the difference between the two cells in both directions
    Have fun

  7. #7
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: Excel 2007 formula returns negative numbers

    Or
    =IF(OR(E2="",F2=""),"",IF(E2<F2,F2-E2,E2-F2))

+ 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