+ Reply to Thread
Results 1 to 5 of 5

SUMIF function

  1. #1
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    SUMIF function

    I am looking at this this function from a former employee: =IF(TRIM($B5)=TRIM($B6);"";SUMIF($B:$B;TRIM($B5);$AM$3:$AM:$AM)+SUMIF($B:$B;TRIM($B5);$AN$3:$AN:$AN))

    which continues throughout:

    =IF(TRIM($B6)=TRIM($B7);"";SUMIF($B:$B;TRIM($B6);$AM$3:$AM:$AM)+SUMIF($B:$B;TRIM($B6);$AN$3:$AN:$AN))
    =IF(TRIM($B7)=TRIM($B8);"";SUMIF($B:$B;TRIM($B7);$AM$3:$AM:$AM)+SUMIF($B:$B;TRIM($B7);$AN$3:$AN:$AN))
    =IF(TRIM($B8)=TRIM($B9);"";SUMIF($B:$B;TRIM($B8);$AM$3:$AM:$AM)+SUMIF($B:$B;TRIM($B8);$AN$3:$AN:$AN))

    I was wondering what the $AM$3:$AM:$AM and $AN$3:$AN:$AN does. What do I achieve by having AM3 and AN2 incorporated, as opposed to just $AM:$AM and $AN:$AN.

    Thanks!

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: SUMIF function

    There appears to be no difference between

    SUM(A2:A3:A4:A5:A6)
    and
    SUM(A2:A6)

    or even
    SUM(A2:A:A)
    and
    SUM(A:A)

    I suggest you change them to the accepted range format of start:end, ie $AM:$AM
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    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,428

    Re: SUMIF function

    I've never seen that construct before. It may be an attempt to use SUMIF from row 3 for the rest of the column. However, I suspect that it may be redundant and not achieve its objective.

    In the Immediate Window in the VB Editor:

    Please Login or Register  to view this content.
    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


  4. #4
    Registered User
    Join Date
    04-03-2017
    Location
    Denmark
    MS-Off Ver
    365
    Posts
    92

    Re: SUMIF function

    Thank you for your responses. That is my conclusion too.

    Regards

  5. #5
    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,428

    Re: SUMIF function

    You're welcome.



    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.

+ 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. [SOLVED] How to nest a left function within a sumif function?
    By LisaK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2017, 09:21 AM
  2. Replies: 4
    Last Post: 10-08-2013, 05:10 PM
  3. Sumif function using indirect function and data from different sheet
    By pronky007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2013, 12:40 PM
  4. Sumif function with in an Index function
    By HenryDavid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-16-2012, 02:07 PM
  5. IF Function Question:SUMIF function
    By VBA Noob in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-03-2007, 03:28 PM
  6. How do I use the TODAY function with the SUMIF function?
    By Lisa B. in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-30-2005, 04:05 PM
  7. [SOLVED] SUMIF Function Inside SUMPRODUCT Function
    By Abdul Waheed in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-19-2005, 12:05 PM
  8. Replies: 2
    Last Post: 01-11-2005, 07: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