+ Reply to Thread
Results 1 to 4 of 4

simple macro help - paste values

  1. #1
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    225

    simple macro help - paste values

    Please Login or Register  to view this content.
    this is the macro i have created to copy the range e2:e53 and paste those values in j2:j53. when i attempt to run i get an error

    "compile error: expected end sub"

    what does this mean. i am very new to VBA and this is the first one that i have attempted so i apologize for how rookie of a mistake this is. thank you for any help given!

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: simple macro help - paste values

    You are simply missing the
    Please Login or Register  to view this content.
    line at the very end. With that said,

    Please Login or Register  to view this content.
    will accomplish the same thing.
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Forum Contributor
    Join Date
    01-06-2011
    Location
    cleveland
    MS-Off Ver
    Excel 2007
    Posts
    225

    Re: simple macro help - paste values

    oh i see...silly mistake. thank you very much. i really like the improvement you made on what i had put together - very logical. i hope most of the things i encounter in the future are as easy as this

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: simple macro help - paste values

    You are getting the error because the "End Sub" is missing at the end of your code.

    Also, you can change your code to this
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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