+ Reply to Thread
Results 1 to 5 of 5

How to tell excel to do the "absolute" subtraction?

  1. #1
    Registered User
    Join Date
    10-05-2018
    Location
    Boston
    MS-Off Ver
    2016
    Posts
    14

    How to tell excel to do the "absolute" subtraction?

    I have three cells, all are numbers: Cell A1, Cell A2, and Cell A3.

    In cell A1 and A2 I can put a value from 0 to 10.

    I need to tell excel to subtract the bigger form the smaller and put the result in cell A3

    If cell A1 is 8 and cell A2 is 4, excel should do: A1-A2 = 4

    But

    If cell A1 is 8 and cell A2 is 10 excel should do A2-A1 = 2

    How do I do that?

  2. #2
    Registered User
    Join Date
    10-05-2018
    Location
    Boston
    MS-Off Ver
    2016
    Posts
    14

    Re: How to tell excel to do the "absolute" subtraction?

    Is it correct to do something like?

    IF(A1>=A2, A1-A2, A2-A1)

  3. #3
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,810

    Re: How to tell excel to do the "absolute" subtraction?

    That would be correct. One could also use MAX(range)-MIN(range), but I think what you are really asking for is the ABS() function: https://support.office.com/en-us/art...a-c99d7c87713c
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  4. #4
    Registered User
    Join Date
    10-05-2018
    Location
    Boston
    MS-Off Ver
    2016
    Posts
    14

    Re: How to tell excel to do the "absolute" subtraction?

    Great, thanks!

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: How to tell excel to do the "absolute" subtraction?

    Or =ABS(A1-B1)

+ 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. Replies: 3
    Last Post: 07-07-2018, 01:12 AM
  2. Replies: 8
    Last Post: 07-12-2017, 05:32 PM
  3. [SOLVED] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  4. Replies: 0
    Last Post: 01-29-2014, 02:58 PM
  5. [SOLVED] Excel 2007: How to Convert "5/2/2013" to "May" then subtract a Month so it's "Apr"
    By Golom in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2013, 02:00 AM
  6. Replies: 4
    Last Post: 08-26-2005, 08:05 PM
  7. Excel should have a simpler subtraction formula similar to "sum".
    By Darius in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-21-2005, 08:06 PM

Tags for this Thread

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