+ Reply to Thread
Results 1 to 10 of 10

SUMIF Formula that stops at a certain point and does not include the stop point

  1. #1
    Registered User
    Join Date
    03-29-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    2

    SUMIF Formula that stops at a certain point and does not include the stop point

    Hi,

    I have a data set that looks like this:

    C3 to C17 has invoice type (Credit or Invoice)
    D3 to D17 has period (Jul-14, Aug-14, Sep-14 etc)
    E3 to E17 has invoice amount

    I'm trying to get a year to date sum of all invoices until November 2014. So I need a sumif formula to only pick up invoices, and I want to sum until the period changes to Dec-14 (but not include any items from Dec-14 and onwards).

    Anyone able to help me out with a formula? I think it would need to be index match but at the moment index match picks up the first occurrence of Dec-14, which I want to exclude.

    Thanks in advance

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Hi, welcome to the forum

    You would use SUMIF() for this, not index/match

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-21-2014
    Posts
    92

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Assuming cell $A$1 has the Dec-14 date:
    Please Login or Register  to view this content.
    Make sure to Ctrl+Shift+Enter to add the { } brackets to the above array formula.
    (ETA: Wait, it seems the above does not need the brackets..)
    Last edited by Monimonika; 03-29-2015 at 07:32 PM.

  4. #4
    Registered User
    Join Date
    05-21-2014
    Posts
    92

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Or, you can use SUMIFS:

    Please Login or Register  to view this content.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Monimonika, you would only include {} (using CSE) if you are working with an ARRY formula - that is not an array formula

    And, if that formula actually works for the OP, then perhaps a sumifS() would be more efficient...
    =SUMIFS($E$3:$E$17,$C$3:$C$17,"Invoice",$D$3:$D$17"<"&$A$1)

  6. #6
    Registered User
    Join Date
    05-21-2014
    Posts
    92

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Yeah, SUMPRODUCT makes it not an array formula.
    I just automatically do CSE almost every time I have ranges nowadays.

    One thing I don't like about SUMIF and SUMIFS is that I do not yet understand (as well as tend to forget) how various criteria are supposed to be formatted. What was the way to indicate NOT()? How was a cell reference supposed to be entered? etc.

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Quote Originally Posted by Monimonika View Post
    What was the way to indicate NOT()?
    <> means "not equal". However, I think it makes it easier to understand if you interpret it to mean "is not".

    "<>X" = not equal to X
    "<>X" = is not X

    How was a cell reference supposed to be entered?
    If you're testing for something like range = X then just use the cell reference of X:

    A1 = X

    SUMIFS(C1:C10,D1:D10,A1,...)

    If you're testing for something like range > 0 then use this...

    A1 = 0

    SUMIFS(C1:C10,D1:D10,">"&A1,...)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Probably the best way to learn how a function works and what the required syntax is, is to use the Fx icon to the left of the formula bar. Start by typing in the function eg =sumifs( then click the Fx icon - a window will open that will show you exactly what excel expects for/each argument

  9. #9
    Registered User
    Join Date
    03-29-2015
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    2

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Edited: didn't reaad the replies properly before posting.

    Thanks all. SUMIF with the date criteria worked perfectly.
    Last edited by berimbau; 04-14-2015 at 02:15 AM.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: SUMIF Formula that stops at a certain point and does not include the stop point

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] Formula that counts specific values, but stops at the point that the value changes.
    By AlphaRaveNZ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2015, 10:16 PM
  2. Replies: 2
    Last Post: 07-05-2014, 10:07 AM
  3. Maths behind rotating rectangle around start point instead of default center point
    By Stanley91 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-08-2014, 11:01 AM
  4. Change font size in formula from 12 point to 8 point
    By maacmaac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-30-2011, 06:14 PM
  5. Replies: 2
    Last Post: 06-27-2011, 10:47 PM

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