+ Reply to Thread
Results 1 to 10 of 10

Formula to Sum Specified Cells Decided by Multiple Dates and Titles

  1. #1
    Forum Contributor garrett.grillo's Avatar
    Join Date
    06-19-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    188

    Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    I have two separate formula's under the Project Year's section (Cells B8 and C8) that are incomplete and I cannot figure out the last part of the equation I need to make it fully work.

    What I do have working is based on the Reporting Month of Mar-19 (Cell: C2), it will scan across the lower Project Month's section for the month and year (Cells: B11:Y11), whether it's listed as a Forecast or Actual Cost (Cells: B12:Y12), and lastly sums up the correct dollar amounts below (Cells: B13:Y13).

    So as shown in the example above, the formula under the Project Year's section in 2019 has a total of $37,925 (Cell: B8). The current formula takes in account of the Reporting Month of Mar-19 (Cell: C2), then it will sum all the dollar amounts on that month (Mar-19) and past month's (so in total, Jan-19 thru. Mar-19) that only have the title of Actual Cost, then it will sum all the dollar amounts in the very next month (Apr-19) and all future month's (so in total, Apr-19 thru. Dec-19) that only have the title of Forecast. In the final total in the Project Year's, 2019 total is $37,925.

    The problem is that in the Project Month's section, the start date may not always begin with the first month of the year. So, with my current fixed formula that is only set between the 12 months of 2019, then another second formula set between the 12 months of 2020. If the starting date in the Project Month's section is set to begin on, let’s say Feb-19 (see dropdown dates in cell C4 to change the example), then my fixed formula of 12 months starts on Feb-19 and unintentionally is pushed out by the fixed formula 12 month duration to the first month of 2020 (Jan-20) which in the end provides the wrong totals for both 2019 at $37,425 (Cell: B8) and 2020 (Cell: C8) Project Year's totals (in this example, the 2020 dollar amount does not change due to empty cells from AX13 and beyond).

    I can't seem to figure out the correct formula that I need to utilize the Project Year's date of 2019 and have the Project Month's formula section stretched across the entire span of dates (Cells: B11:AW11) only to include the months in 2019 and exclude the months in 2020, weather it's listed as a Forecast or Actual Cost, and lastly sums up the correct dollar amounts. So, it will now be one standard formula that will work in both of the Project Year's section (Cells: B8 and C8).

    Thank you for your help and please let me know if you need any additional information.

    Garrett
    Last edited by garrett.grillo; 04-25-2019 at 04:19 PM. Reason: Incorrect Characters Were Added to my Write-Up

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    In the list in sheet Month Drop down list, the starting date is 19/01/2018, I change it to 31/01/2018
    Next cell is EOMONTH($B3,1)
    Drag down
    Sheet Example, C2 & C4 now is last date of month
    In B8:
    Please Login or Register  to view this content.
    Drag to C8
    Quang PT

  3. #3
    Forum Contributor garrett.grillo's Avatar
    Join Date
    06-19-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Hello All,

    I still need help with getting the correct formula.

    I tried the solution above left by, bebo021999 and they almost got it but a problems occurs when in the attached example, in cell C2, when the "Reporting Month" is set to a month in 2020, the cell B8 for 2019 continues to sum up totals in 2020 instead of stopping at 2019.

    Please let me know if you have any questions and thank you for taking the time to review this.

    Garrett

  4. #4
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,783

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Example

    B8=SUMPRODUCT(($B$11:$AW$11>=$C$4)*(($B$11:$AW$11<=$C$2)*(YEAR($B$11:$AW$11)=B$7)*($B$13:$AW$13)))

    copy across until C8
    Last edited by CARACALLA; 07-08-2019 at 05:04 PM.

  5. #5
    Forum Contributor garrett.grillo's Avatar
    Join Date
    06-19-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Hi CARACALLA,

    I tried your formula and unfortunately it did not work. It indiscriminately sums together both the "Forecast" and "Actual Cost" amounts in row 13.

    The formula in cell B8 needs to only sum the range in row 13 the requirements listed below:
    1) Sum only those amounts that are in the month of "Mar-19" (cell C2) and all past months that only have a "Actual Cost" title above them (row 12)
    2) Sum only those amounts that after the month of "Mar-19" (cell C2) that only have a "Forecast" title above them (row 12)
    3) Sum only those totals only within the corresponding "Project Year" (row 7), in 2019 and 2020 separately

    Let me know if this helps or if you need additional information.

    Thank You! :-)

  6. #6
    Forum Contributor garrett.grillo's Avatar
    Join Date
    06-19-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Help on this one anyone?

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Please provide a fresh version of the workbook showing the issues you are having with the formula suggested AND your manually calculated expected results.
    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.

  8. #8
    Forum Contributor garrett.grillo's Avatar
    Join Date
    06-19-2011
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Ok, as requested I have clarified my written request below and have reattached a revision (Rev.1) of the example spreadsheet for your review.

    Please see the latest attached spreadsheet example below when reviewing the requested formula requirements.

    I have two separate formula's under the Project Year's section (Cells B8 and C8) that are very close to working. The one problem that I’m having is that when the “Reporting Month” date (Cell C2) is changed from a month in 2019 to a month in 2020, the “Project Year’s” formula under 2019 (Cell B8) continues to sum amounts in the 2020 “Project Month’s” section as well (Row 11) and the same with the formula under the 2020 (Cell C8) formula.

    What I need each one of the formula’s (Cells B8 & C8) to do is sum the amounts in Row 13 (Cells B13:AW13) based on the following criteria:

    Criteria #1)
    Sum the amounts in Row 13 (Cells B13:AW13) within the corresponding “Project Year’s” section (Cells B7 & C7)

    Criteria #2)
    Then, based on the “Reporting Month” (Cell C2), sum the amounts in Row 13 (Cells B13:AW13) that are on or
    before the “Reporting Month” that are titled “Actual Cost”, then add the amounts in Row 13 (Cells B13:AW13) that
    come after the “Reporting Month” that are titled “Forecast”.

    Answer)
    In “Project Year’s” section:
    2019 = $36,675
    2020 = $44,000
    Total = $80,675

    In the sample spreadsheet, I have also colored the cells that would reflect what the formula should be doing.

    I hope this clarification helps, so please let me know if you need any further information in order to get this formula working correctly.

    Thank You!
    Garrett

  9. #9
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    Please don’t use private messages to prompt members to help with your queries. I am not available to look at your issues now as I am about to go offline. Maybe somebody else will.

  10. #10
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,844

    Re: Formula to Sum Specified Cells Decided by Multiple Dates and Titles

    The answers in post #8 is the same as in the worksheet.

    I suggest you create a scenario in the workbook where the formulas produce the wrong results and then manually type in the correct results.
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

+ 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. Replies: 1
    Last Post: 02-15-2018, 03:56 AM
  2. Specified dates as column titles in Bar Graph
    By DigDoug in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-27-2014, 02:30 PM
  3. [SOLVED] Formula to count based on dates and text in multiple cells - See Spreadsheet
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-16-2013, 11:40 AM
  4. COUNTIF & SUMIF formulas needed when decided based on entry into 2 cells
    By excelteam777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2013, 07:58 PM
  5. using VLOOKUP or similar formula to retrieve dates from multiple cells
    By Ducklet64 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-15-2013, 10:10 PM
  6. Using dates and job titles as two criteria in a count
    By Junior_Excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 07:54 PM
  7. [SOLVED] Confirming job designators and titles over multiple cells
    By octagonaway in forum Excel General
    Replies: 4
    Last Post: 07-15-2012, 07:07 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