Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Copy and Paste Between 2 sheets

  1. #1
    Guest

    Default

    I have 2 Sheets ,Sheet("Graph") and Sheet("Main") I used this command but it quite long because it have to go between Graph and Main do you have anyidea to improve this ?
    If Range("K16").Value <> "-" then
    Sheets("Graph").Range("AR5").Copy
    Sheets("Graph").Cells(i + 1, 44).PasteSpecial
    End If
    If Range("K17").Value <> "-" then
    Sheets("Graph").Range("AR5").Copy
    Sheets("Graph").Cells(i + 1, 44).PasteSpecial
    End If
    If Range("K18").Value <> "-" then
    Sheets("Graph").Range("AR5").Copy
    Sheets("Graph").Cells(i + 1, 44).PasteSpecial
    End If
    ........
    ........
    ............. many many

    Thanks

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Dim oCell As Range


    For Each oCell In Range("K16:K25")
    If oCell.Value <> "-" Then
    Sheets("Graph").Range("AR5").Copy
    Sheets("Graph").Cells(i + 1, 44).PasteSpecial
    End If
    Next


    ivan

  3. #3
    Guest

    Default

    Thanks..

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
  •