+ Reply to Thread
Results 1 to 5 of 5

Copying and pasting from one column to another one by one by pressing a button

  1. #1
    Registered User
    Join Date
    01-10-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    5

    Copying and pasting from one column to another one by one by pressing a button

    Hi guys. Kinda new to VBA and need some help.

    I'd like to create a Button that copies data from column A in every other column every time the button is pressed.

    I did this as my code but when I run the macro, it pastes the data all at the same time, not one by one. Where did I go wrong?

    Please Login or Register  to view this content.
    Last edited by andrewsy03; 01-12-2014 at 05:05 AM.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Need help on a simple VBA code

    Try this......
    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Need help on a simple VBA code

    Hi and welcome to the forum

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the adress bar)

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    01-10-2014
    Location
    Philippines
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Need help on a simple VBA code

    Quote Originally Posted by sktneer View Post
    Try this......
    Please Login or Register  to view this content.
    Thanks for this sktneer.

    It works well. I do hope you can explain the code a little to me.

    What's the purpose of setting "lc" as Integer?

    Also, what does the "End(xlToLeft)" code mean?

    Thanks in advance

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Copying and pasting from one column to another one by one by pressing a button


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. simple vba code
    By grk_chakri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2012, 02:52 PM
  2. help with some simple code please
    By short_n_curly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2010, 04:24 PM
  3. simple VBA code help
    By Iterator in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-06-2009, 01:08 AM
  4. Simple Code, I think...
    By [email protected] in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2006, 03:15 PM
  5. help on this simple code... or not so simple?
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-18-2005, 07:25 AM

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