+ Reply to Thread
Results 1 to 4 of 4

.PasteSpecial problem

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    .PasteSpecial problem

    Hey Dear Community,

    I have problem figuring out , how can i make this code to copy and paste only values ( at the moment it pastes formula )

    Sub CopyPaste()
    Application.ScreenUpdating = False
    
          Dim NextCol As Long
          NextCol = Sheet15.Cells(40, Columns.Count).End(xlToLeft).Column + 1
    
          Sheet15.Range("AJ1:AJ75").Copy Sheet15.Cells(1, NextCol)
    
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub
    Can anybody help me please?

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,317

    Re: .PasteSpecial problem

    Change this line:

    Sheet15.Range("AJ1:AJ75").Copy Sheet15.Cells(1, NextCol)
    to this:

    Sheet15.Range("AJ1:AJ75").Copy
    Sheet15.Cells(1, NextCol).PasteSpecial xlPasteValues
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    06-30-2018
    Location
    Azerbaijan
    MS-Off Ver
    Excel 2016
    Posts
    145

    Re: .PasteSpecial problem

    Thank you so much!

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,317

    Re: .PasteSpecial problem

    Glad to help.

+ 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. PasteSpecial VBA Error (Intermittant Problem)
    By raotto01 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-13-2016, 03:59 PM
  2. [SOLVED] pasteSpecial problem
    By BrownBoy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2014, 06:02 PM
  3. Problem with Copy and PasteSpecial
    By racerstodeath in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-12-2010, 02:19 PM
  4. VBA PasteSpecial problem
    By achinfish in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2007, 05:29 PM
  5. [SOLVED] PasteSpecial Paste:= xlPasteFormats problem
    By Ken Johnson in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2006, 07:30 AM
  6. [SOLVED] PasteSpecial problem in Excel 2002
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2005, 06:05 AM
  7. Problem in PasteSpecial function
    By ojas_maru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2005, 09:05 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