+ Reply to Thread
Results 1 to 11 of 11

SUMIF formula with MONTH condition, please help me simplfy

Hybrid View

  1. #1
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    SUMIF formula with MONTH condition, please help me simplfy

    Dear all , I have a formula:

    =SUMIFS($B:$B,$C:$C,1,$D:$D,"Maintenance")
    Column C is a 'helper' column that contains the month (1= January)

    The formula will sum column B if the Month is January and column D contains "Maintenance"

    But the actual date is contained in Column A and I would like to use this directly in the formula above and remove the helper column



    Any help appreciated!

  2. #2
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: SUMIF formula with MONTH condition, please help me simplfy

    You can use this formula:
    =SUMIFS($B:$B,$A:$A,">="&DATE(2016,1,1),$A:$A,"<"&DATE(2016,2,1),$D:$D,"Maintenance")
    2016 is the year to be calculated

  3. #3
    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 with MONTH condition, please help me simplfy

    One way...

    =SUMPRODUCT(--(TEXT(A1:A10,"mmm")="Jan"),--(D1:D10="Maintenance"),B1:B10)

    You should avoid using entire columns as range references in the SUMPRODUCT function.

    Note: empty cells will evaluate as month Jan.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: SUMIF formula with MONTH condition, please help me simplfy

    ^ will these formulas work if I extend to another column using Autofill?

    In my example the formula will update automatically when I copy and paste at the end of the month (see attachment)

    Screen Shot 2016-03-16 at 4.46.58 PM.png

  5. #5
    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 with MONTH condition, please help me simplfy

    Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.

    If you need to post an image post it in the *.jpg format.

    Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.

  6. #6
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: SUMIF formula with MONTH condition, please help me simplfy

    see attachment
    Attached Files Attached Files

  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 with MONTH condition, please help me simplfy

    You need to normalize your data.

    On the INVOICES sheet in column Sub Section you have entries like Garden and Transport/Travel but on the P&L sheet you have those listed as Garden Costs and Transport.

    They should be the same on both sheets.

    Once you get things normalized, this formula entered in D3:

    =SUMPRODUCT(--(TEXT(INVOICES!$B$2:$B$20,"mmmm")=D$2),--(INVOICES!$G$2:$G$20=$C3),INVOICES!$I$2:$I$20)

    Copy across to H3 then down as needed.

  8. #8
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: SUMIF formula with MONTH condition, please help me simplfy

    Ahh Cool!

    So the names in Column C on the P&L sheet have to match the data validation labels on the pulldown tabs in INVOICE sheet - shouldnt be a problem!

    Thanks

  9. #9
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: SUMIF formula with MONTH condition, please help me simplfy

    ok, will make a sample file

  10. #10
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: SUMIF formula with MONTH condition, please help me simplfy

    I would solve this with a pivot table.

    See the attached file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  11. #11
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: SUMIF formula with MONTH condition, please help me simplfy

    ^ Thx, will check this out

+ 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] Sumif Formula With 2 Condition in Horizontal & Vertical
    By Pawan Thakur in forum Excel General
    Replies: 4
    Last Post: 04-27-2015, 09:11 AM
  2. [SOLVED] Add Condition For if and sumif Function Formula
    By Squint in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2015, 12:48 PM
  3. Replies: 1
    Last Post: 03-25-2014, 10:49 AM
  4. If and sumif condition formula
    By santanuKD in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2011, 03:27 AM
  5. Multiple Condition SumIf Formula
    By JP7 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-19-2007, 09:57 PM
  6. How to simplfy If & Sumif Code
    By Martin in forum Excel General
    Replies: 1
    Last Post: 04-27-2006, 05:35 AM
  7. Multiple Condition Sumif Formula
    By momtoaj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2005, 12:06 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