+ Reply to Thread
Results 1 to 4 of 4

Macro to move data from one cell to another where unique identifier changes

  1. #1
    Registered User
    Join Date
    08-23-2012
    Location
    Jonesboro, AR
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to move data from one cell to another where unique identifier changes

    I am looking for a Macro that will enable me to move data from cells on the row below to the cells directly above upon the change of a unique identifier (CRN). This is probably a little confusing so I have attached a copy of the data that I am working with along with the desired output. I am looking to move the textbook information on to the same line as the course information rather than having it all on separate lines. At each change in CRN the next blank lines (column A) would be moved to the appropriate course.

    The attachment only contains a few courses, I can't do this manually given there are about 12000 records in total in my master spreadsheet. Unfortunately this is just how the data is extracted from the system.

    Any help would be greatly appreciated.

    Thanks

    Chris
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Macro to move data from one cell to another where unique identifier changes

    Try this

    Please Login or Register  to view this content.
    Open up the VBA editor by hitting ALT F11

    Insert a new module by hitting Insert - Module

    Paste the macro into the empty sheet

    Hit ALT F11 to get back to the worksheet.

    Run the macro by going to tools-macro in Excel 2003 or the view ribbon in Excel 2007/2010.
    Martin

  3. #3
    Registered User
    Join Date
    07-10-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Macro to move data from one cell to another where unique identifier changes

    Hi ,

    I made a serious effort on this .. I have kept a Button1 in sheet "Sheet1" , output shall be derived in sheet2

    Please Login or Register  to view this content.
    Hope this would help you !

    Please rate if it works !

  4. #4
    Registered User
    Join Date
    07-10-2012
    Location
    Pune, India
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Macro to move data from one cell to another where unique identifier changes

    sorry did not attach the file in my previous reply !!

    here attached !
    Attached Files Attached Files

+ 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