I'm trying to copy/paste rows (within a range of rows) based on the value in column B. If the value in column B is "Current Forecast", I would like to copy those entire rows and paste them below in the first available blank row.
Here is the code I have so far, but I keep getting various errors such as Variable not Defined on the first Target.
Can anyone see what I am missing? Thanks.
Here is the code I have so far, but I keep getting various errors such as Variable not Defined on the first Target.
Can anyone see what I am missing? Thanks.
PHP:
Sub CopyPaste_CurrFCST()
Dim nxtRow As Integer
If Target.Column = 2 Then
If Target.Value = "Current Forecast" Then
nxtRow = Sheets(2).Range("B" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy _
Destination:=Sheets(2).Range("A" & nxtRow)
End If
End If
End Sub