Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Proper code for Pasting Values

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Milwaukee, WI
    Posts
    105
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    In another post, Dave Hawley wrote the "preferred way" of copying/cutting and pasting was:
    Sheet1.Range("A1").Copy destination:=Sheet2.Range("A1")

    Is there a similar short format for copying a cell and pasting only its values?

    Additionally, can you combine commands such as Sheet1.Columns("A:A").Copy destination:=Sheet2.Range("A1")?

    Thanks.

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I think it might be:

    PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False

    Obviously changing the conditions to suit you

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If values are all you need then try,

    Sheet2.Range("A1").value = Sheet1.Range("A1").value

    Tom


    [ This Message was edited by: TsTom on 2002-04-10 03:14 ]

  4. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Arh! Tom, it's good to see some good habits being formed.



Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •