+ Reply to Thread
Results 1 to 10 of 10

Sum a number of rows back based on value

  1. #1
    Registered User
    Join Date
    01-26-2016
    Location
    15309
    MS-Off Ver
    2013
    Posts
    7

    Post Sum a number of rows back based on value

    Hi everyone.

    i am building an MRP (materials requirement planning) system in excel and am some kind of stuck on the following.

    What i would like excel to do is, based on the lead time (in weeks) that there is a formula to make a cell look at other cell and sum. is this possible?

    I Uploaded an example here http://www.filedropper.com/mrp .

    thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Sum a number of rows back based on value

    I don't follow where you got the value in D10. Based on C10, though, if your goal is to get the sum of the planned receipts from the given column to the column X periods away, based on lead time, see if the formula below does what you want. Paste it in C9 and fill right.

    =SUM(C$8:INDIRECT(CELL("address",OFFSET(C$8,0,$D$2))))

  3. #3
    Registered User
    Join Date
    01-26-2016
    Location
    15309
    MS-Off Ver
    2013
    Posts
    7

    Re: Sum a number of rows back based on value

    Hi cantoh,
    The idea behind the line 10 is, based on the lead time (in week), The planned receipt (line 9) must be placed and summed in the line 10.

    Thanks

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Sum a number of rows back based on value

    I'm still not quite following how the value 58000 fits in D10. What would go in E10 and F10?

  5. #5
    Registered User
    Join Date
    01-26-2016
    Location
    15309
    MS-Off Ver
    2013
    Posts
    7

    Re: Sum a number of rows back based on value

    Hi cantosh,
    Line 9 planned order receipt = quantity, when orders need to be received (calculated based on Lot quantity)
    Line 10 planned order release = when these quantity need to be placed to receive on time (based on lead time).

    Example : in order to receive qty 9000 in week 4 and 7000 in week 5 an order of 16000 should be placed in week 1.

    Thanks,

  6. #6
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Sum a number of rows back based on value

    I apologize if I'm just being thick, but I'm still lost. According to your sample sheet:

    Row 8 = Planned receipts
    Row 9 = Planned Orders
    Row 10 = Planned Orders (What should be)

    My understanding is that you're getting the wrong numbers in Row 9 (800,000 for period 1; 80,000 for period 2), and that the numbers you want to have in Row 9 are the ones you've entered in Row 10 (1,040,000 and 58,000, respectively). Based on my admittedly shaky understanding of what I see, I think I understand that 1,040,000 comes from adding the planned receipts of Periods 1 through 5 (because there's a lead time of 4). Applying that logic, the value for period 2's planned orders would be the sum of the planned receipts for periods 2 through 6, which would be 1,000,0000. Clearly my logic is off, because you're anticipating 58,000 in that cell. What actual math got you that 58,000? If everything works correctly, what numbers should show up as the planned orders for Period 3 and Period 4? Maybe if I have more knowledge of your expected results I'll be better able to grasp what formula you're aiming for.

    EDIT: If it's only 58,000 because you've already placed the order for periods 1 through 5, that would make sense, but why did the value switch from summing planned receipts (row 8) to summing Net POQ Req (row 7)?
    Last edited by CAntosh; 04-05-2016 at 10:37 AM.

  7. #7
    Registered User
    Join Date
    01-26-2016
    Location
    15309
    MS-Off Ver
    2013
    Posts
    7

    Re: Sum a number of rows back based on value

    cantosh,
    I Uploaded an example.
    Hope the example can help me understand what i mean.
    Thanks.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Sum a number of rows back based on value

    Thank you, I think that did help my understanding. The only thing that throws me off now (I think) is the value of 58,000 in cell D10 - your Planned Orders (what should be) for period 2. By my understanding, shouldn't this value be equal to the planned receipts in period 6 (80,000)? Why is it equal to the NET POQ Req for Period 6?

  9. #9
    Registered User
    Join Date
    01-26-2016
    Location
    15309
    MS-Off Ver
    2013
    Posts
    7

    Re: Sum a number of rows back based on value

    Oh no, it's a mistake, actually it should be 80,000 !

  10. #10
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Sum a number of rows back based on value

    Okay, good. I think I get it then. Try this in C9 (or C10) and fill right:

    =IF(RIGHT(TRIM(C$3),1)="1",SUM(C$8:INDIRECT(CELL("address",OFFSET(C$8,0,$D$2)))),OFFSET(C$8,0,$D$2))

+ 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] Change back ground color of button based on week Number on a userform
    By meabrams in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-20-2015, 06:39 AM
  2. [SOLVED] Remove prescribed number of rows from sheet using UserForm back button
    By alistairheeley in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-15-2015, 05:10 AM
  3. Replies: 5
    Last Post: 09-16-2014, 12:17 PM
  4. Count up to a number, then back down to 1, then back up
    By leafs4life22 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-07-2013, 09:11 PM
  5. [SOLVED] How to refer to back-to-back rows in code
    By JaydenK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2013, 03:58 PM
  6. [SOLVED] Counting Number of Times a Value is Repeated REPEATEDLY (Back to Back)
    By patrickfshield in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 11-06-2012, 04:45 AM
  7. Bring Back Multiple Items Based on Common Number
    By 3ric in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2007, 02:44 PM

Tags for this Thread

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