+ Reply to Thread
Results 1 to 9 of 9

Find a date placed in random order from cumulative value adjacent

  1. #1
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Find a date placed in random order from cumulative value adjacent

    Didn't quite know how to word the title, hope this explanation helps

    Column A has dates in a random order, column B has Values.

    I would like to find the date adjacent to a sum value, that sum value could reside in C1. Put the date found in C2.

    many thanks

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Find a date placed in random order from cumulative value adjacent

    it sounds like an index/match might work but when you writ sum value vs values in col B, I'm not sure.
    But this is how I'd do it if index/match would satisfy your needs.
    =index(A:A,match(c1,B:B,0)) and put that in C2. But again, this would work if you are trying to match a value in C1 that is found somewhere in column B and return the adjacent date value in col A. If however a sum is what you have in C1 then I'm not sure how the formula might have to change.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find a date placed in random order from cumulative value adjacent

    Can you post a SMALL sample file and show us what result you expect?

    A SMALL file will have about 20 rows worth of data.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Find a date placed in random order from cumulative value adjacent

    Thanks for the reply's.


    As requested please see the attached sample file, notes on the sheet.

    thanks again
    Attached Files Attached Files

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Find a date placed in random order from cumulative value adjacent

    Insert a helper column (column C) and enter this formula in C2 and fill down. The sum to be found is now in D2 because of the column insertion:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This will sum the values in column B until the target is reached.

    To find the Data associated with the total enter this formula in E2 and format as a date:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    A
    B
    C
    D
    E
    1
    Date Value sum
    date at
    Date
    2
    25 April
    66
    66
    759
    23/05/2015
    3
    03 May
    66
    132
    4
    11 May
    66
    198
    5
    05 May
    66
    264
    6
    15 May
    66
    330
    7
    23 May
    66
    396
    8
    31 May
    33
    429
    9
    25 May
    33
    462
    10
    04 June
    33
    495
    11
    12 June
    33
    528
    12
    14 June
    33
    561
    13
    05 May
    66
    627
    14
    15 May
    66
    693
    15
    23 May
    66
    759
    16
    31 May
    66
    17
    25 May
    66
    18
    05 May
    66
    19
    15 May
    33
    20
    23 May
    33
    21
    31 May
    33
    22
    25 May
    33
    23
    04 June
    33
    24
    12 June
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Find a date placed in random order from cumulative value adjacent

    Newdoverman

    Thanks for your help, your solution does indeed work.
    I was hoping to avoid the use of helper columns, is there anyway other way to get the solution without the need for the extra column ?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find a date placed in random order from cumulative value adjacent

    Try this array formula**:

    =INDEX(A2:A24,MATCH(TRUE,SUBTOTAL(9,OFFSET(B2,,,ROW(B2:B24)-ROW(B2)+1))>=C2,0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Format as Date

  8. #8
    Forum Contributor
    Join Date
    06-10-2014
    Location
    UK
    MS-Off Ver
    2010
    Posts
    272

    Re: Find a date placed in random order from cumulative value adjacent

    Tony

    Thank you very much, perfect solution.

    Ron, thanks for taking the time to post your solution too.

    regards

  9. #9
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Find a date placed in random order from cumulative value adjacent

    You're welcome. Thanks for the feedback!

+ 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] Cumulative SUM of values - in a order specified by a order list 1-10
    By etaf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-30-2015, 03:56 PM
  2. Find a Min Value and retain the date adjacent to the Min Value
    By alghareeb in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2014, 04:27 AM
  3. Replies: 1
    Last Post: 08-13-2012, 11:18 AM
  4. Excel 2007 : random order, how to do this?
    By sevenn in forum Excel General
    Replies: 1
    Last Post: 05-30-2012, 07:08 AM
  5. Random date in order without duplicates
    By tigabalm in forum Excel General
    Replies: 2
    Last Post: 07-13-2009, 07:28 PM
  6. [SOLVED] date function to find most recent order
    By floridasurfn in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-20-2006, 12:45 PM
  7. [SOLVED] How do I find random number in list of random alpha? (Position is.
    By jlahealth-partners in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 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