+ Reply to Thread
Results 1 to 4 of 4

Changes in code to paste special - Values

  1. #1
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Changes in code to paste special - Values

    Hello,

    I have this code that copies cells in a row and pastes it at different places in another sheet.

    Please Login or Register  to view this content.
    Instead of ActiveSheet.Paste i need to paste only values. But it does not work. I googled and it said first i need to select range which i think is selected in the line above the paste function. What am i missing. There are almost 150 cells that need to be copied. I spent hours writing the code below but then realized that i need to use paste special.

    Please Login or Register  to view this content.
    PS: I have deleted lots of repetitive code above as the forum does not allow more than 15000 characters. Is there an easy way to write this code?
    I do have 2 columns.

    For eg.

    r = "EV" & ri
    Range(r).Select
    Application.CutCopyMode = False
    Selection.Copy
    Windows(f).Activate
    Range("C65").Select
    ActiveSheet.Paste

    I have prepared 2 columns. One contains list like EV above and next to it i have range like C65.

    Thank you for reading.

    EDIT: Is there any way i can Ctrl+H and replace all something with something else? That would be very useful.
    Last edited by moonbreakker; 05-10-2016 at 08:48 AM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Changes in code to paste special - Values

    Try change these type of references in your code.

    Please Login or Register  to view this content.
    To:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    02-23-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    133

    Re: Changes in code to paste special - Values

    Worked. I did CTRL+H and changed as you mentioned.

    Thank you so much.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Changes in code to paste special - Values

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. [SOLVED] Change code to paste as special (values)
    By zipaway in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-29-2014, 10:37 AM
  2. [SOLVED] Paste special values from one sheet to another using VBA code in excel
    By chavanalini in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-12-2013, 08:31 AM
  3. VBA code to open new workbook and copy and paste special values
    By oddinho2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2013, 11:24 PM
  4. add "paste special..values" to non-recorded code
    By sdsaavedra in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-11-2013, 06:12 PM
  5. [SOLVED] Set code copy and paste special values
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-25-2012, 08:52 PM
  6. [SOLVED] Code for Copy and Paste Special- Values in Columns
    By gautamacharya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2012, 04:51 PM
  7. Paste special as values code not working?
    By HelenW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-05-2008, 08:03 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