+ Reply to Thread
Results 1 to 15 of 15

Merge Month function in SUMIFS function

Hybrid View

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    32

    Merge Month function in SUMIFS function

    Please have a look at the attached file.
    Sheet "FinanceData" column A to I are client data, I have to manipulate column J and K to fetch data to Month tab.
    Instead of manipulation in separate columns, I want to include those formulas in Sumifs function in Month tab.
    Please help me how to retrieve exact month text like 'Janaury', 'February' etc from date column in FinanceData sheet and replace the below formula.

    =SUMIFS(FinancialData!$C$2:$C$33,FinancialData!$K$2:$K$33,$C4)
    Attached Files Attached Files
    Last edited by wincross; 07-28-2017 at 01:32 AM.

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Merge Month function in SUMIFS function

    Try

    E4
    Formula: copy to clipboard
    =SUMIFS(FinancialData!C:C,FinancialData!$E:$E,">="&DATE(2017,ROWS(E$4:E4),1),FinancialData!$E:$E,"<="&EOMONTH(DATE(2017,ROWS(E$4:E4),1),0))
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

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

    Re: Merge Month function in SUMIFS function

    I have updated thread title. Is it fine now?

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Merge Month function in SUMIFS function

    btw. Instead of formulas in two J & K columns on Month tab you can use one formula in a single column
    if you wish of course
    Formula: copy to clipboard
    =CHOOSE(MATCH(IF(YEAR(E2)=YEAR(TODAY()),MONTH(E2),0),{0,1,2,3,4,5,6,7,8,9,10,11,12},0),"","January","February","March","April","May","June","July","August","September","October","November","December")

  5. #5
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Merge Month function in SUMIFS function

    Quote Originally Posted by sandy666 View Post
    btw. Instead of formulas in two J & K columns on Month tab you can use one formula in a single column
    if you wish of course
    Formula: copy to clipboard
    =CHOOSE(MATCH(IF(YEAR(E2)=YEAR(TODAY()),MONTH(E2),0),{0,1,2,3,4,5,6,7,8,9,10,11,12},0),"","January","February","March","April","May","June","July","August","September","October","November","December")
    Sandy I can be very simple.

    Try

    Formula: copy to clipboard
    =TEXT(E2,"MMMM")

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Merge Month function in SUMIFS function

    Shukla,
    I know but this is something "for future" instead of too many IFs. Not exactly for this case but more general

  7. #7
    Registered User
    Join Date
    05-21-2014
    Posts
    32

    Re: Merge Month function in SUMIFS function

    Thanks Shukla. It works great.
    I need one more help. I tried to include another condition in your formula however it shows #value error.
    =SUMIFS(FinancialData!C:C,FinancialData!$E:$E,">="&DATE(2017,ROWS(E$4:E4),1),FinancialData!$E:$E,"<="&EOMONTH(DATE(2017,ROWS(E$4:E4),1),INDIRECT("FinancialData!$BB$2:$BB$" &$C$1),1))
    Additional conditional - add only if column BB contains 1.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,372

    Re: Merge Month function in SUMIFS function

    INDIRECT("FinancialData!$BB$2:$BB$?" &$C$1),1)

    Not clear what you are trying here ????

  9. #9
    Registered User
    Join Date
    05-21-2014
    Posts
    32

    Re: Merge Month function in SUMIFS function

    John,
    Adding data only if certain conditions met.

    =SUMIFS(INDIRECT("FinancialData!$C$2:$C$33"),INDIRECT("FinancialData!$B$2:$B$33"),$AB37,INDIRECT("FinancialData!$BB$2:$BB$33"),1)
    Here 33 is static so I placed below code in C1 to find last row dynamically, Now C1 will have row number which has last client data (even after addition or deletion of data).

    =SUMPRODUCT(MAX((FinancialData!$D:$D<>"")*ROW(FinancialData!$D:$D)))
    I have replaced first syntax with this one

    =SUMIFS(INDIRECT("FinancialData!$C$2:$C$" &$C$1),INDIRECT("FinancialData!$B$2:$B$" &$C$1),$AB37,INDIRECT("FinancialData!$BB$2:$BB$" &$C$1),1)
    Is it clear?

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,372

    Re: Merge Month function in SUMIFS function

    Works fine for me.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,372

    Re: Merge Month function in SUMIFS function

    See next post ...

  12. #12
    Registered User
    Join Date
    05-21-2014
    Posts
    32

    Re: Merge Month function in SUMIFS function

    John,

    I have attached a file with required output.

    Result in E4 of Sheet1
    I want to add column C data (sheet FinancialData) if the month (column E) is January and column L should have '1' (Sum=120)

    Result in E5 of Sheet1
    I want to add column C data (sheet FinancialData) if the month (column E) is February and column L should have '1' (Sum=18)
    Attached Files Attached Files

  13. #13
    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
    81,591

    Re: Merge Month function in SUMIFS function

    In E4 copied down:

    =SUMIFS(FinancialData!C:C,FinancialData!$E:$E,">="&DATE(2017,ROWS(E$4:E4),1),FinancialData!$E:$E,"<="&EOMONTH(DATE(2017,ROWS(E$4:E4),1),0),FinancialData!$L:$L,1)

    Just a case of adding another criterion at the end of the SUMIFS statement.
    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.

  14. #14
    Registered User
    Join Date
    05-21-2014
    Posts
    32

    Re: Merge Month function in SUMIFS function

    Thank you so much Ali. It works great.
    This is what I wanted.

    Thanks everybody for looking into this.

  15. #15
    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
    81,591

    Re: Merge Month function in SUMIFS function

    You're welcome!

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

+ 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 and function
    By tellemt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-09-2015, 10:19 AM
  2. [SOLVED] SUMIFS Function
    By raffyjavellana in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 07-12-2015, 02:07 AM
  3. sumifs function help
    By Rebien in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2015, 12:54 PM
  4. [SOLVED] Using large function based on sumifs function
    By jeosen in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2015, 08:20 AM
  5. SUMIFS and OR function
    By bridge4444 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-08-2014, 07:20 AM
  6. Help nesting an OR function inside a SUMIFS function
    By wes228 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-21-2014, 06:22 PM
  7. SUMIFS function
    By mmmarks in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-12-2013, 09:09 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