+ Reply to Thread
Results 1 to 3 of 3

Macro to copy/Duplicate two columns of data

  1. #1
    Registered User
    Join Date
    11-15-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    19

    Question Macro to copy/Duplicate two columns of data

    Hi, Hopefully someone with a greater knowledge of excel macros can help, i am having no joy...

    I have two columns of data (Column A - has values such as A / B / C / D etc. etc..etc , and then i have Column B - which has values such as 1 / 2 / 3 4 etc . etc.)

    I am looking for a macro which will create two separate columns ( on the same sheet - say COLUMN D & E), returning the following values ( not sure how to explain this part) :-

    COLUMN D COLUMN E
    A 1
    A 2
    A 3
    A 4
    B 1
    B 2
    B 3
    B 4 ETC. ETC. ETC


    The main problem have is that the number of values in each column varies from sheet to sheet, and the values in column A & B are both text of varies lengths, so getting it to finish on the last result/s is key.

    Any help would be much appreciated.

    Thanks

    Gary

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Macro to copy/Duplicate two columns of data

    Hi Uzzgee,

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-15-2011
    Location
    Scotland
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: Macro to copy/Duplicate two columns of data

    Hi xladept,

    Thanks for your reply, unfortunetly i cant seem to get you macro to work correctly, it appears to just duplicate the data instead of creating the list i require.

    I have attached an example excel sheet with some example data.

    I output i require needs to show each street name with 1 of every LINK TYPE.

    Hope you can help and my explanation makes sense.

    Thanks

    Gary
    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