+ Reply to Thread
Results 1 to 8 of 8

Calculate Across multiple Rows Depending on Column Content - end Result Date

  1. #1
    Registered User
    Join Date
    01-29-2018
    Location
    Cali
    MS-Off Ver
    Microsoft 365 MSO 64-Bit Version 2008 (Build 13127.21216)
    Posts
    94

    Calculate Across multiple Rows Depending on Column Content - end Result Date

    Hey there team,

    I have a Document here with a special formula in the AD column.

    This column Checks the total quantity (column U)'s value depending on the Base Item matching the Item No.

    Then is checks the additive quantity on that same Row, then gives the destination column that matches the quantity noted in column AB.

    This is a per Item number formula that we were able to get done.

    Now what I need help with, is to have the same formula goal in column AC. Difference being, instead of being Based on Item No. which are unique, I need it based on the "Category 2", with this being multiple rows, I assumed sumifs formulas will help to get the totals, but we are trying to see when the quantity will be exhausted.

    Example "Drink Mix" category has 3 different lines the total inventory count is 393, counting across each row containing Drink Mix, from left to right, at what row will we finish the 393 cases. So with this example given the, the formula should return "44408".
    Attached Files Attached Files
    Last edited by Tybudd; 07-22-2021 at 04:54 PM. Reason: Moderator Enforced

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Complex Formula help needed

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-29-2018
    Location
    Cali
    MS-Off Ver
    Microsoft 365 MSO 64-Bit Version 2008 (Build 13127.21216)
    Posts
    94

    Calculate Across multiple Rows Depending on Column Content - end Result Date

    Besides the title, the information in the body of the original post has all the information I believe is needed.

    I was not intending to offend the Excel Veteran's by telling them how to do so, I was just explaining it the best way I felt i could get the message of what I was looking for understood.
    Last edited by Tybudd; 07-22-2021 at 05:00 PM.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Calculate Across multiple Rows Depending on Column Content - end Result Date

    This proposal employs helper columns (AH:AV) which may be moved and/or hidden for aesthetic purposes.
    The formula for the helper columns is: =IF($C6=$C7,"",SUMPRODUCT(($C$4:$C6=$C6)*($F$4:F6)))
    The formula for column AC is: =IF(C4=C5,"",INDEX(AH$2:AV$2,AGGREGATE(15,6,(COLUMN(AH4:AV4)-COLUMN(AG4))/(AH4:AV4>=SUMIFS(AB$4:AB4,C$4:C4,C4)),1)))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    01-29-2018
    Location
    Cali
    MS-Off Ver
    Microsoft 365 MSO 64-Bit Version 2008 (Build 13127.21216)
    Posts
    94

    Re: Calculate Across multiple Rows Depending on Column Content - end Result Date

    Thanks JeteMC,

    It seems like this formula setup is based on specific cell location, this problem is the table when update can possible move the location of lets say "Drink Mix" and be further down the column therefore not calculate correctly. In addition with this setup, how would I go about copying the formula down the column, I believe the specific cell addresses again might be the issue?

    Is there a way we can create a unique list of what's in the Category 2 column, and reference that in some way?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Calculate Across multiple Rows Depending on Column Content - end Result Date

    The formula for the helper columns may be modified to read: =SUMPRODUCT((OrderDemand[[Category 2]:[Category 2]]=$C4)*($F$4:F$81))
    The formula for column AC may be modified to read: =IFERROR(INDEX(AH$2:AV$2,AGGREGATE(15,6,(COLUMN(AH4:AV4)-COLUMN(AG4))/(C$4:C$81=C4)/(AH$4:AV$81>=SUMIFS(AB$4:AB$81,C$4:C$81,C4)),1)),"")
    Note that the Inventory Count for Drink Mix includes the value 12 in cell AB48 which makes the "Exhaust Date By Category" 44411.
    Note that some cells in column AC are blank because some categories do not expire (i.e. CON022) while others contain non numeric values in the Inventory Count (i.e. Special).
    On Sheet1 the "Exhaust Date By Category" values are displayed using: =INDEX(MatchRefTable[Exhaust Date By Category],MATCH(A2,OrderDemand[Category 2],0))
    Let us know if you have any questions.

  7. #7
    Registered User
    Join Date
    01-29-2018
    Location
    Cali
    MS-Off Ver
    Microsoft 365 MSO 64-Bit Version 2008 (Build 13127.21216)
    Posts
    94

    Re: Calculate Across multiple Rows Depending on Column Content - end Result Date

    JeteMc,

    The result could not have been any more perfect. Even down to the explanation of what does what, I greatly appreciate your assistance

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Calculate Across multiple Rows Depending on Column Content - end Result Date

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. I hope that you have a blessed day.

+ 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. Complex Formula or SQL needed
    By zmbaker in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 04-22-2014, 06:09 PM
  2. Complex Formula Help Needed!
    By contraububu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-11-2013, 02:40 PM
  3. Complex formula needed but where do i start?
    By Ripcurl1983 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 09-26-2012, 12:35 PM
  4. complex formula help needed!!!!!
    By emmaxstar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-09-2011, 09:28 AM
  5. Complex Formula Help Needed
    By Ivorian in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-06-2009, 03:28 AM
  6. formula for complex tallying needed
    By m2bowles in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2009, 05:10 PM
  7. Formula Needed, could be complex
    By pauldaddyadams in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-21-2005, 11:33 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