Hello all,
I am currently working on the below coding:
Private Sub CommandButton1_Click()
Dim LR As Long, i As Long
Sheets("Sheet2").UsedRange.ClearContents
LR = Range("F" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If Not IsError(Range("F" & i)) Then
If InStr(LCase(Range("F" & i).Value), "compensation payment") > 0 Or InStr(LCase(Range("F" & i).Value), "large") > 0 Then Rows(i).Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
End Sub
I want to add another variable which involves dates. I want it to look in column K and if the day is within the current month - paste it to sheet 2
Can anybody help me please as I'm stuck?
Thanks
I am currently working on the below coding:
Private Sub CommandButton1_Click()
Dim LR As Long, i As Long
Sheets("Sheet2").UsedRange.ClearContents
LR = Range("F" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If Not IsError(Range("F" & i)) Then
If InStr(LCase(Range("F" & i).Value), "compensation payment") > 0 Or InStr(LCase(Range("F" & i).Value), "large") > 0 Then Rows(i).Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
End Sub
I want to add another variable which involves dates. I want it to look in column K and if the day is within the current month - paste it to sheet 2
Can anybody help me please as I'm stuck?
Thanks