Results 1 to 3 of 3

Copy rows with values in column H and paste special in different sheet

Threaded View

  1. #1
    Registered User
    Join Date
    03-16-2015
    Location
    India
    MS-Off Ver
    2010
    Posts
    2

    Question Copy rows with values in column H and paste special in different sheet

    Hello Guys,
    This is my first post to the form.
    I am trying to do following:

    1. Sheet 1 has main data with formulas starting from row 8
    2. I want to select the rows based on the values in column H (numeric value should be >0)
    3. Copy the entire row and paste in sheet 2, starting from first empty row and then to subsequent rows without keeling any rows blank.

    This is what I have written but is not working:

    Sub Generate_Result()
    Dim i, LastRow
    LastRow = Sheets("Sheet 1").Cells(Rows.Count, 1).End(xlUp).Row
    Sheets("Sheet2").Range("A3:T500").ClearContents
    For i = 8 To LastRow
    If Sheets("BoQ_Structure").Cells(i, "H").Value > 0 Then
    Sheets(“Sheet1″).Cells(i, “H”).EntireRow.Copy Destination:=Sheets(“Sheet2″).Range(“A” & Rows.Count).End(xlUp).Offset(1)
    
    End If
    Next i
    End Sub
    Last edited by Vikas Singhal; 03-18-2015 at 04:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 09-18-2012, 11:47 AM
  2. [SOLVED] Macro to find SKU in column; then copy data in row and paste special (values)
    By Starkey in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-13-2012, 06:05 AM
  3. Macro to copy and paste special values for column data and filter column data
    By ascottbag in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-10-2012, 02:15 PM
  4. Replies: 6
    Last Post: 12-09-2011, 05:22 AM
  5. Replies: 0
    Last Post: 05-24-2010, 05:17 PM

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