+ Reply to Thread
Results 1 to 7 of 7

Formula needed to determine higher figure and subtract lower

  1. #1
    Registered User
    Join Date
    03-04-2011
    Location
    devon, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Formula needed to determine higher figure and subtract lower

    Hi.. I'm an excel newbie and so would be grateful for any help with my question;

    a b c

    100 50
    100 150

    I want to get an answer for c. I need to start with col a as that is my base fig. Sometimes the figure in b is lower than a and sometimes it's higher so I need a calculation that determines which is the higher figure a or b and then subtracts the lower figure and displays it in c.
    I do not want a negative figure. Does this make sense?

    Chris.
    Last edited by tizwas; 03-04-2011 at 06:20 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formula needed

    Hi,

    Try this:

    =MAX(A1:B1)-MIN(A1:B1)

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

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

  3. #3
    Registered User
    Join Date
    02-27-2011
    Location
    Manchester, England
    MS-Off Ver
    Excel 2003
    Posts
    40

    Re: Formula needed

    Put this formula in cell C1
    =IF(A1>B1,A1-B1,B1-A1)
    Regards
    MrExcelPro

  4. #4
    Registered User
    Join Date
    03-04-2011
    Location
    devon, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formula needed

    I get this message #VALUE!

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formula needed

    For which formula?

    Dom

  6. #6
    Registered User
    Join Date
    03-04-2011
    Location
    devon, england
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Formula needed

    Sorry... to the other one... To yours I get 0 which is wrong! The only thing I am changing is the a,b,c my columns are f,i,and k for c. Which is where I put your formula... Where am I going wrong?

    Chris.

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formula needed

    Not sure. Can you attach a sample workbook showing the error?

    Dom

+ 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