+ Reply to Thread
Results 1 to 8 of 8

Using absolute value for criteria range in Sumifs

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    United States
    MS-Off Ver
    2010
    Posts
    30

    Using absolute value for criteria range in Sumifs

    Hi,

    So I have a formula as follows:

    =SUMIFS(BD:BD,J:J,J15,AD:AD,AD15,ABS(BD:BD),ABS(BD15))

    Although it is not working because I cannot use ABS() on a criteria range. is there any other way that I can have this formula sum the values if the absolute value of the number in that row is equal to the absolute value of 1 or more values in the same column but a different row?

    Thanks,
    Justin

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,382

    Re: Using absolute value for criteria range in Sumifs

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    could become:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, although you can use full column references in SUMPRODUCT in Excel 2007 and above, you should not do so as it will affect the performance of the spreadsheet. In that respect, it would be better to use Dynamic Named Ranges or Structured Tables for the data.

    Best bet would be to post a sample workbook.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


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

    Re: Using absolute value for criteria range in Sumifs

    never tried what you are doing but maybe you need the ABS in front of the sumifs, have you tried that?
    and this part would seem to give you a circular reference, no? AD:AD,AD15
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

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

    Re: Using absolute value for criteria range in Sumifs

    Hey Trevor, aren't J:J,J15 and AD:AD,AD15 circular references? (just curious)

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Using absolute value for criteria range in Sumifs

    The alternative of sumifs in this case would be the Sumproduct formula like this......

    Please Login or Register  to view this content.
    ****Referencing whole column (like AD:AD) is not a good idea.
    Last edited by sktneer; 07-08-2014 at 04:02 PM.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,382

    Re: Using absolute value for criteria range in Sumifs

    @sktneer:
    The correct Sumproduct formula would be like this......
    Meaning what? My suggested formula is incorrect? It works, as is, but is noticeably slow due to the full column references.

    @Sambo kid: no, it's not a circular reference. It's just using one entry in the range for the comparison. Strange, maybe, as clearly at least one entry is equal to the value being tested for .. that is, itself.

    @HcLax: Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Using absolute value for criteria range in Sumifs

    Quote Originally Posted by TMS View Post
    @sktneer:

    Meaning what? My suggested formula is incorrect?
    Oh not really. It's just different approach of writing it.
    ***Edited my last post.
    Last edited by sktneer; 07-08-2014 at 04:03 PM.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,382

    Re: Using absolute value for criteria range in Sumifs

    @sktneer:

    I am conscious that I tend to use a double negative when it is not necessary (for the column being summed) and I generally will put the summed range in brackets even though that isn't strictly necessary either. Force of habit, and I do like the symmetry Your version is probably more efficient.

    Regards, TMS

+ 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. SUMIFS with a criteria range ?
    By vemix in forum Excel General
    Replies: 6
    Last Post: 12-20-2012, 11:56 PM
  2. Replies: 3
    Last Post: 11-21-2012, 04:57 PM
  3. [SOLVED] sumifs formula one range with two criteria
    By avk in forum Excel General
    Replies: 7
    Last Post: 07-13-2012, 02:13 PM
  4. Replies: 1
    Last Post: 05-16-2011, 05:00 PM
  5. Changing Criteria from absolute value to a range?
    By cosmicgrooves in forum Excel General
    Replies: 1
    Last Post: 12-06-2007, 09:09 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