+ Reply to Thread
Results 1 to 10 of 10

Repeating a date difference formula to groups of varying size.

  1. #1
    Registered User
    Join Date
    08-09-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Repeating a date difference formula to groups of varying size.

    Hi All I need help developing a formula that I can repeat down a column of approximately 3000 entries. I am attempting to find the difference between the top date and following dates for each group populate in column A and have the formula repeat accordingly.

    The problem I am having is that my basic formulas don't recognize groups or varying group sizes and adjust accordingly. When attempting this myself I've noticed that my formulas repeat and do not account that a group may have have more than 2 entries and there is a blank present. I've attached a test spreadsheet.
    Any help is appreciated, hopefully this will save me hours of manual calculations. Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Repeating a date difference formula to groups of varying size.

    Hello
    Try the following formula from A3 down on your sample file. Does this do what you're looking for?

    Please Login or Register  to view this content.
    Hope this helps.
    DBY

  3. #3
    Registered User
    Join Date
    08-09-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Repeating a date difference formula to groups of varying size.

    Thanks for the post, first off the formula you provided is much cleaner than the DATEDIF fx I was using. It still lacks the component of subtracting from the top row in the group as opposed to how it currently subtracts from the row directly above it. The problem only presents itself in groups greater than 2.

    Much appreciated. cp

  4. #4
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Repeating a date difference formula to groups of varying size.

    Try the following:

    Please Login or Register  to view this content.
    By the 'top row in the group' I assume you mean in reference to column C, rather than each group of dates.

    DBY
    Last edited by DBY; 08-09-2012 at 02:01 PM. Reason: Solution not working

  5. #5
    Registered User
    Join Date
    08-09-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Repeating a date difference formula to groups of varying size.

    Actually I am referring to the top row of the group, not column C. That is the source of my troubles...besides user error...

    cp

  6. #6
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Repeating a date difference formula to groups of varying size.

    Sorry CP
    I'm struggling to think of a solution at the moment, I'll get back if I can think of anything. Hopefully another forum member might have a solution.

    DBY

  7. #7
    Registered User
    Join Date
    08-09-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Repeating a date difference formula to groups of varying size.

    No worries, thanks for your time.

    cp

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Lightbulb Re: Repeating a date difference formula to groups of varying size.

    Hello again
    Not sure if you're still looking for a solution but take a look at the attached file. It uses a helper column but maybe it does what you're looking for.

    DBY
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-09-2012
    Location
    Raleigh, NC
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Repeating a date difference formula to groups of varying size.

    Thanks DBY this is perfect. I almost look forward to the next report I can use it on.

    cp

  10. #10
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Repeating a date difference formula to groups of varying size.

    @ cput

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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