Hello everyone,

Imagine if I have more than one row with the current date. My macro works for one row but I want it to work for multiple rows, how can I fix it, here is the code.

    Sub SelectingPartOfTable()

    Workbooks.Open Filename:="Y:\Guinness\Error Log\NBCGF Event Log.xlsm"
    Dim i As Integer
    
    Workbooks("Risk").Activate
    Sheets("Sheet1").Select
    
    For i = 1 To 100
    
    If Cells(i, 2) = Date Then
    
    Cells(i, 2).EntireRow.Select
    Selection.Copy
    
    Workbooks("NBCGF Event Log").Activate
    Sheets("NBCGF Error Log").Select
    
    Rows("2:2").Select
    Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    With Selection.Interior
        .Pattern = xlNone
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Range("A2").Select
    ActiveSheet.Paste
    
    End If
    
    Next i
    
End Sub