View Single Post
 
Old 10-03-2022, 12:53 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 591
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Here are two attempts that failed :


Code:
Sub Names()
    Dim Cell As Range
    Dim NextRow As Variant
    Dim lrA As Long   ', lrD As Long
    Dim i As Long, j As Long, x As Long
    
    Application.ScreenUpdating = False
    
    lrA = Range("K" & Rows.Count).End(xlUp).Row
    NextRow = Sheet3.Cells(Rows.Count, 1).End(xlUp).Row + 1
    
        For i = 7 To lrA
        
                If Range("K" & i).Resize("N" & i).Value = "0.00" Then
                    Range("K" & i).EntireRow.Copy Destination:=NextRow
                End If
         
                i = i + 1
            
        Next i
    
    Application.ScreenUpdating = True
    
    'MsgBox "completed"

End Sub

Sub copy_rows()
Dim i As Long

i = Sheet1.Range("A" & Rows.Count).End(xlUp).Row

    For i = 7 To i
    
        If Cells(i, 11) = "0.00" And Cells(i, 12) = "0.00" And Cells(i, 13) = "0.00" And Cells(i, 14) = "0.00" Then
        
           Cells(i, 11).EntireRow.Copy Sheet3.Cells(Rows.Count, 1).End(xlUp).Row + 1
        End If
    
    Next i


End Sub
Reply With Quote