+ Reply to Thread
Results 1 to 6 of 6

Sumproduct by month/year with an if function?

  1. #1
    Registered User
    Join Date
    05-23-2022
    Location
    Cyprus
    MS-Off Ver
    Microsoft 365 Enteprise
    Posts
    19

    Sumproduct by month/year with an if function?

    Hello guys,

    I have managed to implement a sumproduct formula by month&year but I want to add maybe an If function that it will ignore the blank cells of another column.
    Please find enclosed the excel worksheet.

    Thank you very much in advance for your contributions.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,760

    Re: Sumproduct by month/year with an if function?

    Try this:

    =SUMPRODUCT((MONTH(A2:A443)=2)*(YEAR(A2:A443)=2022)*(C2:C443<>"")*(B2:B443))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    05-23-2022
    Location
    Cyprus
    MS-Off Ver
    Microsoft 365 Enteprise
    Posts
    19

    Re: Sumproduct by month/year with an if function?

    Hello Ali,

    Thanks for the prompt response. Works great.
    What do I need to insert in case I want it to ignore the cells with value instead of blanks?

    Thanks, E.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,760

    Re: Sumproduct by month/year with an if function?

    I think you mean this:

    =SUMPRODUCT((MONTH(A2:A443)=2)*(YEAR(A2:A443)=2022)*(C2:C443="")*(B2:B443))

  5. #5
    Registered User
    Join Date
    05-23-2022
    Location
    Cyprus
    MS-Off Ver
    Microsoft 365 Enteprise
    Posts
    19

    Re: Sumproduct by month/year with an if function?

    Works like a charm. Thank you very much!

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,760

    Re: Sumproduct by month/year with an if function?

    Glad to have helped.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Thanks for the rep.

+ 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] counting whole year month using sumproduct?
    By sagarkarki69 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-05-2020, 03:29 AM
  2. [SOLVED] Sumproduct Function with Month and Year Filter
    By Zenly in forum Excel General
    Replies: 6
    Last Post: 11-22-2019, 11:18 AM
  3. Sumproduct - looking for month and year.
    By Bandito1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-20-2018, 08:59 AM
  4. SUMPRODUCT - Month AND Year
    By CarloF in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-19-2015, 12:58 PM
  5. sumproduct+countifs+month year function does not work
    By apskhinda in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2013, 07:01 AM
  6. [SOLVED] SUMPRODUCT, OR, Less than Month & Less than Year
    By JUGGAKNOTZZ in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-01-2013, 10:51 AM
  7. Sumproduct with month and year ???
    By jpeirano in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2011, 09:07 AM

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