Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Adding up Absolute numbers

  1. #1
    New Member
    Join Date
    May 2002
    Location
    Queens, New York
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm working on a spreadsheet in which one column has both negative and positive number. Below the column I would like a sum of the absolute values of those figures I tried this formula but it didn't work. =sum(abs(A1:a5)) I also tried =sum(abs(a1):abs(a5)). Any ideas.. Please help.

    -Danny

  2. #2
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    83,658
    Post Thanks / Like
    Mentioned
    33 Post(s)
    Tagged
    6 Thread(s)

    Default


    =SUMPRODUCT((ABS(A1:A5)))

    would do.

  3. #3
    New Member
    Join Date
    May 2002
    Location
    Queens, New York
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Aladdin. It works perfectly.

    -Danny

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm glad you got a workable solution. Another way to do this without an array type solution would be
    =SUMIF(A1:A5,">0")-SUMIF(A1:A5,"<0")

    I'd only go with this if you are using the formula often in a big sheet and notice performance issues.

    Good luck

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •