+ Reply to Thread
Results 1 to 10 of 10

INDEX with accumulative SUM

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    Europe
    MS-Off Ver
    Excel 2003, 2007
    Posts
    26

    INDEX with accumulative SUM

    Hi guys,

    Bit stuck here.
    In the example attached, I want column E to show the store number (row 3) up to which stocks are sufficient (if we accumulate the individual usage from left to right).
    So in the example, I'd like it to return "store 4" for product 1.

    Is there any way I can do this in a single formula? I was trying a few variants of SUM and INDEX (array entered), or am I completely thinking along the wrong lines?

    Any help appreciated, thanks.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: INDEX with accumulative SUM

    On Sheet2 I've add a formula.
    You need to extend it to right and down as much as you have your data (or more).
    Then you can use formula in Sheet1.

    (Hint: You can hide Sheet2 if you like)
    Attached Files Attached Files
    Never use Merged Cells in Excel

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    Europe
    MS-Off Ver
    Excel 2003, 2007
    Posts
    26

    Re: INDEX with accumulative SUM

    Thanks for the quick reply. I can't seem to download the attachment, it keeps taking me to the log in screen (even though I'm alrady logged in).

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,036

    Re: INDEX with accumulative SUM

    Don't know why...

    Write this in sheet2 G4 (same cell as data in sheet1).
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And in Sheet1 E4 enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You should get number 4.

    (Replace ; with , if needed)

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    Europe
    MS-Off Ver
    Excel 2003, 2007
    Posts
    26

    Re: INDEX with accumulative SUM

    Quote Originally Posted by zbor View Post
    Don't know why...

    Write this in sheet2 G4 (same cell as data in sheet1).
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    And in Sheet1 E4 enter:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    You should get number 4.

    (Replace ; with , if needed)
    Yeah, that's the way went with the other day because I needed to get it done in a hurry. But I was hoping there was a more direct way, without having to rely on parallel data on another sheet.

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: INDEX with accumulative SUM

    hi Mecha_Trueno. try this at E4:
    =LOOKUP(2,1/((SUBTOTAL(9,OFFSET(G4,,,,COLUMN(G4:AJ4)-COLUMN(G4)+1))<=D4)*(G4:AJ4<>"")),$G$3:$AJ$3)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: INDEX with accumulative SUM

    Mecha,

    You should be able to download the attachment now. Please try and let me know.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  8. #8
    Registered User
    Join Date
    11-29-2012
    Location
    Europe
    MS-Off Ver
    Excel 2003, 2007
    Posts
    26

    Re: INDEX with accumulative SUM

    Quote Originally Posted by benishiryo View Post
    hi Mecha_Trueno. try this at E4:
    =LOOKUP(2,1/((SUBTOTAL(9,OFFSET(G4,,,,COLUMN(G4:AJ4)-COLUMN(G4)+1))<=D4)*(G4:AJ4<>"")),$G$3:$AJ$3)
    Brilliant, works perfect.
    Just wondering, would it have worked just as well without the <>”” test?

    Quote Originally Posted by arlu1201 View Post
    Mecha,

    You should be able to download the attachment now. Please try and let me know.
    Nope, still getting redirected.

  9. #9
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: INDEX with accumulative SUM

    you're very welcome. in a scenario where total amount in G:AJ is greater than column D, it will show as "Store 30". so no. it would not work without that portion of it
    Last edited by benishiryo; 10-21-2013 at 08:00 PM. Reason: grammar edit

  10. #10
    Registered User
    Join Date
    11-29-2012
    Location
    Europe
    MS-Off Ver
    Excel 2003, 2007
    Posts
    26

    Re: INDEX with accumulative SUM

    Thanks for all your help guys.

+ 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. Accumulative with a twist!
    By johno87 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-07-2012, 07:00 PM
  2. Accumulative total
    By charles in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-09-2006, 11:15 AM
  3. Accumulative Chart?
    By chew in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 04-01-2006, 03:10 PM
  4. [SOLVED] Want to have accumulative totals in each row
    By Sherry in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-30-2005, 12:25 PM
  5. Accumulative calculations
    By tacnola in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-09-2005, 02:07 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