+ Reply to Thread
Results 1 to 9 of 9

SumProduct by year Issue

Hybrid View

JO505 SumProduct by year Issue 03-03-2013, 04:06 PM
Norie Re: SumProduct by year Issue 03-03-2013, 04:14 PM
JO505 Re: SumProduct by year Issue 03-03-2013, 04:40 PM
Dunc3142 Re: SumProduct by year Issue 03-03-2013, 04:37 PM
Norie Re: SumProduct by year Issue 03-03-2013, 04:44 PM
JO505 Re: SumProduct by year Issue 03-03-2013, 05:15 PM
Norie Re: SumProduct by year Issue 03-03-2013, 05:27 PM
Dunc3142 Re: SumProduct by year Issue 03-03-2013, 05:30 PM
JO505 Re: SumProduct by year Issue 03-03-2013, 06:28 PM
  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    SumProduct by year Issue

    Attached is a sample of a file I am having an issue with, namely the Sum by Year section on the Jobs by Type sheet. Fir some reason I can't get the formula to work when changing years. The sum by Customer section works fine but everything stops when trying to sum by year. I have looked a formats and I think they are fine (they do work when sunning by customer). Any help would be appreciated.

    Jim O
    Attached Files Attached Files
    Last edited by JO505; 03-03-2013 at 06:29 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: SumProduct by year Issue

    There are empty strings in the cells below the dates.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: SumProduct by year Issue

    I see. Is their a way to work around that as the range will always be changing and will most certainly have blank cells.

    Jim O

  4. #4
    Valued Forum Contributor Dunc3142's Avatar
    Join Date
    09-05-2007
    Location
    Franklin OH
    MS-Off Ver
    2000 and 2007 and 2010 @ Home & Teach 2010
    Posts
    351

    Re: SumProduct by year Issue

    See if this will work for you. I have calculated for just the year in column B, and changed the font color to the same as the background.
    Attached Files Attached Files
    Yes it will. we just have to figure out how...
    If I have helped you, PLEASE click the * and add to my Rep.
    Also, if the problem is SOLVED please mark it as so.

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: SumProduct by year Issue

    Jim

    Change the formulas on the Job worksheet to return 0 instead of "".

    You can hide the 0s with formatting or conditional formatting.

  6. #6
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: SumProduct by year Issue

    Norie,

    I am not sure I am following you correctly. The cost column on the Jobs sheet has no formulas the data is entered directly. I went through the data and changed the blank cells to 0 and I can get the formula to work only if I adjust the range in the formula itself. In the summary sheet cell B2 allows the data to be changed and with it the range to select from. I need a dynamic formula that will take into account the changing range.

    Jim O

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,645

    Re: SumProduct by year Issue

    It's not the cost column that's the problem, it's the date column.

    On 'Jobs by Type you have this formula in E5, copied down to E100.
    Formula: copy to clipboard

    =Job!Q2

    In Q2 down on 'Job' you have this formula.
    Formula: copy to clipboard

    =IF($O2="","",INDEX($A$1:$E$201,$O2,3))


    If O2 on 'Job' is "" then this formula will return "", so the formulas in column E on 'Job by Type' will return "" if column O on 'Job' is empty.

    If you change the formula on 'Job' to this the SUMPRODUCT will calculate correctly.
    Formula: copy to clipboard

    =IF($O2="",0,INDEX($A$1:$E$201,$O2,3))


    Or you could create dyanmic named ranges.

  8. #8
    Valued Forum Contributor Dunc3142's Avatar
    Join Date
    09-05-2007
    Location
    Franklin OH
    MS-Off Ver
    2000 and 2007 and 2010 @ Home & Teach 2010
    Posts
    351

    Re: SumProduct by year Issue

    Doesn't my earilier post do what you want? The attachemnt has changes in it.

  9. #9
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: SumProduct by year Issue

    Norie,

    Thank you for the input.

    Dunc3142,

    Thank you as well I missed your first post.

    Both solutions are very good I am not sure which I will go with but both have been very helpful.

    Again Thanks to both of you,

    Jim O

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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