+ Reply to Thread
Results 1 to 5 of 5

Macro to Find end of Column and paste Contents in Column 1

  1. #1
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Macro to Find end of Column and paste Contents in Column 1

    I have the file here i work with, basically the first column is a legend and the column to the right of it is a pointer column to help me find out where a legend is located in another file. So i was wondering if a macro could be made to basically find where the "legend column" A, C, E ect ends ( every other column is a legend column , one next to it is a pointer column ).

    and then combine the ends all of the columns contents and put them into 1 column.

    In the file with this question i have showed you what i start off with, i highlighed in yellow where each column legend ends, ( normally these are not highlighted and i find them manually ).

    In the 2nd tab i show what the end result should be. All the columns are now consolidated into 1 column. 1 after the other.

    any help would be great, thanks
    Attached Files Attached Files
    Last edited by donnydorko; 03-11-2009 at 10:22 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to Find end of Column and paste Contents in Column 1

    Put this macro in a standard module and run it on a copy of your data. Should do the trick:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro to Find end of Column and paste Contents in Column 1

    OK works perfectly, is there anyway you can have it work to where the tabs dont have to be named that.

    For instance it should put the info in the tab to the right of the tab i run the macro in, that way i dont have to have the tabs named anything in particular.
    Last edited by donnydorko; 03-11-2009 at 08:15 PM.

  4. #4
    Forum Contributor
    Join Date
    01-25-2009
    Location
    Louisiana
    MS-Off Ver
    Excel 2007
    Posts
    177

    Re: Macro to Find end of Column and paste Contents in Column 1

    acutally this is perfect, thanks bro , saved me alot of time

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro to Find end of Column and paste Contents in Column 1

    You can change the names of the sheets in the macro to anything you want. Just spot the "Start off with" and "Ends up with" and insert your other sheet names instead.

+ 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