Morning All!
I'm trying to use a find function to set a range to copy. It all runs fine when the values I search for are found, but I would like to manually select a range if the values aren't found.
So far I've come up with this, but Keep getting Error 91.. Any help?
Sub CopyRange()
Dim FindName As Range
Dim FindEnd As Range
Dim ManEnd As Range
Dim CopyRange As Range
Set FindName = Range("A:A").Find(What:="Text").Offset(2)
Set FindEnd = Range("C:E").Find(What:="Text2").Offset(-2)
If FindEnd Is Empty Then
ManEnd = Application.InputBox("Where to?", Type:=8)
Set CopyRange = Range(FindName.EntireRow, ManEnd.EntireRow)
Else
Set CopyRange = Range(FindName.EntireRow, FindEnd.EntireRow)
End If
CopyRange.Copy
End Sub
Bookmarks