+ Reply to Thread
Results 1 to 12 of 12

Copy Paste Macro with Values & Skipping Blanks

Hybrid View

  1. #1
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Copy Paste Macro with Values & Skipping Blanks

    This is the code from that thread
    Sub MoveNumbers()
        Dim i As Long
        Dim j As Long
        j = 12
        For i = 5 To 22
            If Cells(i, 38).Value > 0 Then
                Cells(j, 1).Value = Cells(i, 38).Value
                j = j + 1
            End If
        Next i
    End Sub
    It is already pasting the values. See this line
      Cells(j, 1).Value = Cells(i, 38).Value
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  2. #2
    Registered User
    Join Date
    05-30-2012
    Location
    LONDON
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Copy Paste Macro with Values & Skipping Blanks

    Oh god I'm an idiot... I did have the wrong thread. The code is here: http://www.excelforum.com/excel-prog...ing-macro.html by Leith Ross.

    Sorry for the wild goose chase, this is doing my head in. The code by jefferybrown isn't suitable for what I'm trying to achieve. I tried building a code from scratch but found myself over complicating it and running into issues. The code by Leith works, but I can't seem to adapt it to paste values only.

    Thanks for your attention so far mate, any ideas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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