+ Reply to Thread
Results 1 to 4 of 4

Merge Dates and Totals

  1. #1
    Forum Contributor
    Join Date
    12-31-2008
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    149

    Merge Dates and Totals

    Hi,

    Please see attached.

    I am looking for some code to merge data. As per the example, the costs of rows 3 & 4 are combined, and the earliest date is used, along with the latest Period End Date.

    Each Code may have between 1 and 10 rows.

    I'd be very glad of any help. If anyone can suggest a solution, can you post the VBA rather than attaching a spreadsheet.

    Many thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Merge Dates and Totals

    Hi,

    I have written some code for you.
    Im sure it can be done more efficient but it works

    I've attached the file, open the file, enable macros and press the button.
    You can see the result on sheet2.

    Steffen Thomsen
    Attached Files Attached Files
    Please take time to read the forum rules

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Merge Dates and Totals

    as an option
    Attached Files Attached Files

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Merge Dates and Totals

    There is a formula approach.

    Make sure your dates are dates and not text strings, or that the date columns are not formatted as text.

    See this workbook
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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