+ Reply to Thread
Results 1 to 8 of 8

Copy multiple rows only if column is filled in

Hybrid View

soldevi53 Copy multiple rows only if... 02-08-2012, 02:15 PM
arlu1201 Re: Macro to Copy multiple... 02-08-2012, 02:33 PM
soldevi53 Re: Macro to Copy multiple... 02-08-2012, 02:39 PM
soldevi53 Re: Macro to Copy multiple... 02-08-2012, 04:01 PM
soldevi53 Re: Macro to Copy multiple... 02-08-2012, 05:20 PM
soldevi53 Re: Copy multiple rows only... 02-08-2012, 06:56 PM
soldevi53 Re: Copy multiple rows only... 02-08-2012, 11:29 PM
arlu1201 Re: Copy multiple rows only... 02-09-2012, 03:11 AM
  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.

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

    Re: Macro to Copy multiple rows(continious) only if certain column is filled in

    Please attach a sample workbook and specify what needs to be copied.
    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]

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

    Re: Macro to Copy multiple rows(continious) only if certain column is filled in

    Here it is

    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

    Thanks
    Attached Files Attached Files

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

    Re: Macro to Copy multiple rows(continious) only if certain column is filled in

    Anyone? PLease

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

    Re: Macro to Copy multiple rows(continious) only if certain column is filled in

    Trying this now but no luck as well


    Sub copyrows()
    Dim cl As Range
    Dim LR As Long
    LR = Cells(Rows.Count, "U").End(xlUp).Row
    For Each cl In Range("U13:AD" & LR)
    If cl = True Then
    
       cl.EntireRow.Copy Sheets("Index").Range("A" & Sheets("Index").Cells(Rows.Count, "A").End(xlUp).Row + 1)
    End If
    Next cl
    End Sub

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

    Re: Copy multiple rows only if column is filled in

    somebody must have a code I can use or manipulate for this

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

    Re: Copy multiple rows only if column is filled in

    ????????????????????????

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

    Re: Copy multiple rows only if column is filled in

    Can you try explaining again? What do you mean outside the print area? Which is the print area u have set? Can you type in some examples into your file so we can understand better?

+ 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