+ Reply to Thread
Results 1 to 11 of 11

SUMPRODUCT to find month and other data

  1. #1
    Registered User
    Join Date
    11-22-2019
    Location
    MI
    MS-Off Ver
    2016
    Posts
    30

    Question SUMPRODUCT to find month and other data

    Hello everyone,

    I am trying to come up with a way to get a total count based on the month which contains the data I am looking for.

    Essentially I need excel to look for the Month from column F, then look for the initials from AB in column D, then look for the text "Forecast" in column J, then look for the text "Met DLT" in column AP. I am trying to use SUMPRODUCT to do this but it keeps giving me #VALUE!.

    Here I currently have:

    =SUMPRODUCT(--(MONTH(F2:F9999)=2)*(D2:D9999,AB4)*(J2:J9999="Forecast")*(AP2:AP9999="Met DLT"))

    I added a small example of my document for reference. As you can see in the example I'm also trying to pull the data from another sheet as well (which is referenced above for clarity reasons).

    Thanks for any help!

    -Chris
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,842

    Re: SUMPRODUCT to find month and other data

    Try this:
    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=2),--(IWWC_Data!D2:D9999=AB4),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))

  3. #3
    Registered User
    Join Date
    11-22-2019
    Location
    MI
    MS-Off Ver
    2016
    Posts
    30

    Re: SUMPRODUCT to find month and other data

    That worked! Thank you very much!

    If you don't mind me asking, what exactly does the -- do?

  4. #4
    Forum Expert
    Join Date
    09-30-2019
    Location
    Chiangmai, Thailand
    MS-Off Ver
    Office 2016, Excel 2019
    Posts
    1,234

    Re: SUMPRODUCT to find month and other data

    Did you mean

    =SUMPRODUCT(--(MONTH(F2:F9999)=2)*(D2:D9999=AB4)*(J2:J9999="Forecast")*(AP2:AP9999="Met DLT"))

    Regards.

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,842

    Re: SUMPRODUCT to find month and other data

    It basically turns a TRUE value to a 1 and a FALSE value to 0.

  6. #6
    Registered User
    Join Date
    11-22-2019
    Location
    MI
    MS-Off Ver
    2016
    Posts
    30

    Re: SUMPRODUCT to find month and other data

    Quote Originally Posted by Gregb11 View Post
    It basically turns a TRUE value to a 1 and a FALSE value to 0.
    So now I am seeing a second issue. I am also trying to add to the count if there are specific initials (From cell BK4) in column Y. But in column Y of my data set there may be more than one set of initials. I tried using the "*"&BK4&"*" to pull out the exact initials that are in BK4 but it won't count them.

    I reattached my sample with the updated formula that you suggested earlier (which works perfectly as you can see from the example attached). Then I just added a + and essentially copy and pasted the same formula but changed where it is looking for the initials. But it won't count the initials from column Y like I need it to.

    Thanks again for any help!
    Attached Files Attached Files

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: SUMPRODUCT to find month and other data

    What's your expected answer? 20?

    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=BQ4),--(IWWC_Data!D2:D9999=BK4),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))+SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=BQ4),--(ISNUMBER(SEARCH("*"&BK4&"*",IWWC_Data!Y2:Y9999))),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

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

    Re: SUMPRODUCT to find month and other data

    Better it be to make it search instead of =

    Try

    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F10)=BQ4),--(IWWC_Data!D2:D10=BK4),--(IWWC_Data!J2:J10="Forecast"),--(IWWC_Data!AP2:AP10="Met DLT"))+SUMPRODUCT(--(MONTH(IWWC_Data!F2:F10)=BQ4),--(SEARCH("*"&BK4&"*",IWWC_Data!Y2:Y10)),--(IWWC_Data!J2:J10="Forecast"),--(IWWC_Data!AP2:AP10="Met DLT"))
    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)

  9. #9
    Registered User
    Join Date
    11-22-2019
    Location
    MI
    MS-Off Ver
    2016
    Posts
    30

    Re: SUMPRODUCT to find month and other data

    Quote Originally Posted by Glenn Kennedy View Post
    What's your expected answer? 20?

    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=BQ4),--(IWWC_Data!D2:D9999=BK4),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))+SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=BQ4),--(ISNUMBER(SEARCH("*"&BK4&"*",IWWC_Data!Y2:Y9999))),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))
    Yes the result should be 20 and yours worked! Thanks!

    Quote Originally Posted by shukla.ankur281190 View Post
    Better it be to make it search instead of =

    Try

    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F10)=BQ4),--(IWWC_Data!D2:D10=BK4),--(IWWC_Data!J2:J10="Forecast"),--(IWWC_Data!AP2:AP10="Met DLT"))+SUMPRODUCT(--(MONTH(IWWC_Data!F2:F10)=BQ4),--(SEARCH("*"&BK4&"*",IWWC_Data!Y2:Y10)),--(IWWC_Data!J2:J10="Forecast"),--(IWWC_Data!AP2:AP10="Met DLT"))
    Yours for some reason gave me total of 18 when it should be 20. Not sure how that happened.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,127

    Re: SUMPRODUCT to find month and other data

    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.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

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

    Re: SUMPRODUCT to find month and other data

    [QUOTE



    Yours for some reason gave me total of 18 when it should be 20. Not sure how that happened.[/QUOTE]

    It is just because I have given range upto 10th row, however if you can make it more shorter the why don't you go with below one.

    =SUMPRODUCT(--(MONTH(IWWC_Data!F2:F9999)=BQ4),(--(IWWC_Data!D2:D9999=BK4))+(--(ISNUMBER(SEARCH("*"&BK4&"*",IWWC_Data!Y2:Y9999)))),--(IWWC_Data!J2:J9999="Forecast"),--(IWWC_Data!AP2:AP9999="Met DLT"))

+ 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] Month Over Month Headcount with SUMPRODUCT
    By kdalyveris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-05-2020, 04:55 PM
  2. [SOLVED] Averageifs or Sumproduct to find daily average in month?
    By Wolfieee in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-07-2019, 10:50 PM
  3. Summed data for month(s) to find monthly average
    By T86157 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-10-2018, 04:03 PM
  4. Find data from previous month macro
    By KRPO200 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-29-2016, 07:36 PM
  5. Sumif or Sumproduct Data in month when data is represented in mmddyyyyy format
    By ankurkhandelwal1978 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-19-2012, 05:00 PM
  6. Find a Month and associated data within a Range
    By ChrisMcKenna in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-10-2011, 07:36 PM
  7. Find value for last day of month with data
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-09-2010, 12:40 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