I am working on trying to find an item in an excel sheet and pasting information in an adjacent column. I need to strip the number in the first excel sheet of its hypens and then find it in the other document. I have had no issues with this, thus far, however when I try to select the second row I am getting a compilation error, saying line number or label was expected.
Sub info()
Dim dehyp As Long
Dim rng As Range
dehyp = Replace(Range("A5").Value, "-", "")
Sheets("Gov").Select
Set rng = Sheets("Gov").Columns(1).Find(What:=dehyp, LookIn:=xlFormulas,
LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
Select
Selection.Copy
Sheets("Total usage").Select
Range("B5").Select
ActiveSheet.Paste
End sub