kevinh2320
Board Regular
- Joined
- May 13, 2016
- Messages
- 61
I'm trying to learn VBA but, haven't been able to get my code to work. I have a worksheet called Leases. In column "F" of this worksheet I have a dropdown menu with "Yes" & "Question" as the options. I want to copy the entire row (cells A - J) if cell "F" contains either of those options. Then paste that data into the next available row in my "Notes" worksheet.
Below is my incomplete code:
Sub Test()
Dim rngFound As Range
With Worksheets("Leases").Cells
Set rngFound = .Find("Yes", LookIn:=xlValues)
If Not rngFound Is Nothing Then
Worksheets("Notes").Activate
Range("A1048576").Select
Selection.End(xlUp).Offset(1, 0).PasteSpecial
Else
'nothing found
End If
End With
End Sub
Appreciate your help!
Below is my incomplete code:
Sub Test()
Dim rngFound As Range
With Worksheets("Leases").Cells
Set rngFound = .Find("Yes", LookIn:=xlValues)
If Not rngFound Is Nothing Then
Worksheets("Notes").Activate
Range("A1048576").Select
Selection.End(xlUp).Offset(1, 0).PasteSpecial
Else
'nothing found
End If
End With
End Sub
Appreciate your help!