+ Reply to Thread
Results 1 to 3 of 3

Simple data rearrangement - hard to code

  1. #1
    Registered User
    Join Date
    07-27-2007
    Posts
    7

    Simple data rearrangement - hard to code

    I have to columns with data: one with a company name, the other with a date. I need to create a third column in which the relative previous date appears, which is quite simple. However, the number of observations per company is inconsistent; therefore I cannot simply copy and move the date range.

    Therefore, I need a macro which can do this for the 20,000+ rows of data I have, but this is beyond my coding abilities. Please help!

    The data looks like this, and I basically need to create the new column:

    Existing data New column
    Company Date Previous Date
    A 05/2003
    A 09/2003 05/2003
    B 08/1996
    B 10/1996 08/1996
    B 09/1997 10/1996
    B 09/1998 09/1997
    B 09/1999 09/1998
    C 08/2000
    C 12/2000 08/2000
    C 12/2001 12/2000
    C 12/2002 12/2001
    C 12/2003 12/2002
    C 12/2004 12/2003
    D 08/1998
    D 05/2000 08/1998

    There is an example attached as well.

    Thank you so much for your help!!!

    Leon
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302
    I have added a "Fill Down" formula that does what you want.
    See your sheet, modified and uploaded

    Before sorting anything, make the dates permanent by
    Select them all: Copy: (dont move selection) : Paste Special - Value

    This removes the formulas and replaces them with the result values.

    Save the formula somewhere else to use again.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-27-2007
    Posts
    7
    What an elegant solution - didn't see how I could fix that with just formulas, but you made it look easy!

    Thanks a lot!

+ 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