Consulting

Results 1 to 14 of 14

Thread: Sumproduct formula help

  1. #1
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location

    Sumproduct formula help

    Can someone please help me with this formula?

    SUMPRODUCT((MONTH(Issues_Closed_On)=1)*YEAR((Issues_Closed_On)=2008)*(Issue _Status="Active")*(Job_Assigned_To="Charlie"))

    I have 3-columns and Named ranges, namely, Issues_Closed_On, Issue_Status and Job_Assigned_To. Issues_Closed_On has list of dates.

    I need to find the no. of "Active" in the month of January where the Job_Assigned_To was "Charlile". I am getting value error in my formula.

    Thanks.
    -u

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Can you post a sample to save us having to recreate it?
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    Sure, I have attached a sample sheet. Actually, my actual purpose of this table is to create a dynamic chart to check the no. of Active issues for each for 4-responsible parties in a given time. I don't know how to create a dynamic chart that shows a no. of Active issues (in my table) in a given time.

    So I thought if a can calculate a summary of Active issue for each month I can make a chart that shows the no. of Active issues for each month.

    As for this problem, another hurdle is, under the heading "Trinity", I need the sumproduct value based on Issue_Closed_On=Month(1),Issue_Status="Active",Job_Assigned_To = Trinity*(anything with "Trinity)
    -u

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    =SUMPRODUCT(--(MONTH(Issues_Closed_On)=1),--(YEAR(Issues_Closed_On)=2008),--(Issue_Status="Active"),--(Job_Assigned_To="Charlie"))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    Hello xld,

    I am still getting the value error in L5 of the attached sheet. Thanks.
    -u

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You need to change the range names to start at row 3, and corect the invalid value in G16.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    Thanks xld. I just found where I made the blunder.

    I needed to find How many Active Issues were there in the Month of January, Feb and so forth, but if the data in column H is active then value in Column G(Issue_Status) will always be empty.

    Now, is it possible to count how many blanks were there in each month or Is it possible to count how many "Active" were there in Column "Issue_Statues"? Both condition would give the same answer because, if "Issue_Status" is "Closed" then its corresponding cell in "Issues_Closed_On" would have a date.
    -u

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by U_Shrestha
    Now, is it possible to count how many blanks were there in each month
    =SUMPRODUCT(--(MONTH(Issues_Closed_On)=1),--(YEAR(Issues_Closed_On)=2008),--(Issue_Status=""))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    I think this problem requires a different approach since I am getting zero by using the formula. I think answer lies between columns Issues_Closed_On and Job_Assigned_To only.
    =SUMPRODUCT(--(MONTH(Issues_Closed_On)=1),--(YEAR(Issues_Closed_On)=2008),--(Issue_Status=""))

    To summarize the situation, "Issues_Closed_On" can either be Blank (meaning issue is still active) or a Date (issue closure date). I need to find how many blanks were there in a given month (jan, feb, mar, so forth). If a cell (Eg. G99), is blank until today then this would be one of the Issue that was Active at the end of January, February and March, there may be others too, but if it was closed on 3/12/08 the it would be counted as an Active issue for Jan and Feb.

    Looking at the attached table, what is the best way to calculate total no. of Active issues in each month for "Charlie"? Would it be simpler if we calculate Total No. of Issues in a given month and then divide it into Active and Closed issues?
    -u

  10. #10
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Is this closer

    =SUMPRODUCT(--((Issues_Closed_On="")+(Issues_Closed_On>=TODAY())),--(Issue_Status=""))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  11. #11
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    No, I am afraid. With this formula
    [=sumproduct((Issues_Closed_On="")*(Job_Assigned_To="Charlie"))] I got 34, which is the total no. of Active Issues For March. But since various issues were closed on Jan and Feb, its Active no. of issues should be different.
    -u

  12. #12
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    That is not what I suggested.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  13. #13
    VBAX Tutor
    Joined
    Feb 2008
    Location
    New York
    Posts
    215
    Location
    I tried your formula but I didn't get the correct number. Thanks.
    -u

  14. #14
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Okay!
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •