+ Reply to Thread
Results 1 to 3 of 3

Paste values does not work for Worksheets.Cells.Copy

  1. #1
    Registered User
    Join Date
    09-02-2024
    Location
    Poland
    MS-Off Ver
    365
    Posts
    3

    Paste values does not work for Worksheets.Cells.Copy

    Hi

    I have below line of code for copying data from one cell to another:

    Please Login or Register  to view this content.
    it returns #REF

    Source cell has formula including function (ReturnNoteText) as I get the data from cell note.

    Please Login or Register  to view this content.
    I have value in a cell but when copying it returns #REF.
    I checked a lot of variants with paste values and using range instead of cell as well, but no effect :|

    I count on your help

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Paste values does not work for Worksheets.Cells.Copy

    You can't copy the formula since it uses relative addressing to refer to a cell 30 columns to the left of the formula cell, but you are pasting it to column 5. If you want to just copy the values, you can just assign them directly:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Expert ByteMarks's Avatar
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    O365 32bit (Windows)
    Posts
    3,176

    Re: Paste values does not work for Worksheets.Cells.Copy

    What about.

    Please Login or Register  to view this content.

+ 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. copy only format and values and paste to other work sheet
    By ikshanu in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-31-2020, 04:46 PM
  2. conditional format can not work with copy paste values
    By keshavtale in forum Excel General
    Replies: 4
    Last Post: 09-24-2017, 11:03 PM
  3. Replies: 0
    Last Post: 08-07-2012, 02:01 PM
  4. Replies: 0
    Last Post: 08-07-2012, 01:52 PM
  5. Copy Paste Values all worksheets & creating new worksheets
    By ryan2600 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-05-2012, 11:46 AM
  6. Copy/Paste across worksheets doesn't work
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2011, 12:34 AM
  7. Copy and paste values from one work book to another workbook
    By TheAnswer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2010, 02:57 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