Results 1 to 8 of 8

Copy multiple rows only if column is filled in

Threaded View

  1. #1
    Registered User
    Join Date
    02-08-2012
    Location
    Alberta,Canada
    MS-Off Ver
    Excel 2010
    Posts
    10

    Copy multiple rows only if column is filled in

    Hello all,

    New here but like the topic explained I would like to use a button on Sheet2"Meter Run", to populate the entire row from sheet 1"Index", only if a certain column filled in, while ignoring other rows until reaching another row with said column populated.

    Thanks everyone



    I'm pretty bad with excel but I have the button and

    Sub copyrows()
         
        'assuming the data is in sheet1
        Sheets("Index").Select
        RowCount = Cells(Cells.Rows.Count, "U").End(xlUp).Row
        For i = 1 To RowCount
             'assuming the true statment is in column a
            Range("a" & i).Select
            check_value = ActiveCell
            If check_value = "True" Or check_value = "true" Then
                ActiveCell.EntireRow.Copy
                 'assuming the data is in sheet2
                Sheets("Meter List").Select
                RowCount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
                Range("a" & RowCount + 1).Select
                ActiveSheet.Paste
                Sheets("Index").Select
            End If
        Next
    End Sub
    Basically if any column pupulated outside the print area(U13-AD13)

    it will take that entire row onto the next sheet(meter Run) using the button at the top
    Attached Files Attached Files
    Last edited by soldevi53; 02-08-2012 at 06:57 PM.

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