+ Reply to Thread
Results 1 to 5 of 5

How do I return a column reference once a cumulative total is reached

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Exclamation How do I return a column reference once a cumulative total is reached

    I've currently got a spreadsheet with months along the top (columns) and then for each line item a different task I work on. For example

    Column A2 = "Create Plans"
    Of which I have 45 in total (Subtotal in B2)

    I then have Months Jan (Col C) through to Dec (Col N), in row 2 I will then detail which months I actually work on the plans so say I start in Feb (D2 = 10), work on 30 more in Mar (E2=30) and complete the final 5 in Apr (F2=5)

    I'm trying to figure out a way of returning the column number at which the cumulative total reaches 45.... I've tried using min and max look ups but if I extend my selection to column N then then max only returns the final date I have zero's in rather than the column I actually achieve the total.

    I've had a good look around and it appears as though I could do with something similar to this control+shift+enter...

    =MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,0,ROW(A1:A7)-CELL("Row",A1)+1))>=100000,0)

    except that it would work over multiple columns rather than data fed down the list.

    Any help would be truely appreciated!

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    06-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    341

    Re: How do I return a column reference once a cumulative total is reached

    Can you provide an example spreadsheet with exactly how it looks currently and where you want the desired result to displaz

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: How do I return a column reference once a cumulative total is reached

    here is an example of what I'm after....

    thanksCumulative Date Identification (1).xls

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,778

    Re: How do I return a column reference once a cumulative total is reached

    Try this formula for Q2

    =INDEX(D$1:P$1,MATCH(TRUE,D2:P2<>"",0))

    confirmed with CTRL+SHIFT+ENTER

    and this for R2

    =INDEX(D$1:P$1,MATCH(TRUE,SUBTOTAL(9,OFFSET(D2,0,0,1,COLUMN(D2:P2)-COLUMN(D2)+1))>=B2,0))

    also with CTRL+SHIFT+ENTER
    Audere est facere

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    Derby, England
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: How do I return a column reference once a cumulative total is reached

    That's worked thanks... any suggestions for columns S and T?

+ 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