bhsoundman
Board Regular
- Joined
- Jul 17, 2010
- Messages
- 50
- Office Version
- 365
- Platform
- MacOS
Can someone tell me what I'm doing wrong? This macro returns a 1004 error. I know the problem is regarding addr. Thanks in advance
Sub Venue_Rolodex()
Dim venue As String
Dim finalrow As Integer
Dim i As Integer
Dim addr as string
venue = Sheets("rolo").Range("f1").Value
finalrow = Sheets("rolo").Range("a1000").End(xlUp).Row
addr = Sheets("Rolo").Range("A" & i).Value
For i = 2 To finalrow
If Cells(i, 1) = venue Then
Range("G5").Value = addr
End If
Next i
Application.CutCopyMode = False
Range("f1").Select
End Sub
Sub Venue_Rolodex()
Dim venue As String
Dim finalrow As Integer
Dim i As Integer
Dim addr as string
venue = Sheets("rolo").Range("f1").Value
finalrow = Sheets("rolo").Range("a1000").End(xlUp).Row
addr = Sheets("Rolo").Range("A" & i).Value
For i = 2 To finalrow
If Cells(i, 1) = venue Then
Range("G5").Value = addr
End If
Next i
Application.CutCopyMode = False
Range("f1").Select
End Sub