JohnEOasis
Programmer
When I run the following code I get an Object variable or With block variable not set error and can not figure out why any helpl would be appriciated.
Code:
Dim InputRange As Range
Dim OutputRange As Range
Set InputRange = Sheets("Misc").Range("A18:E18")
Set OutputRange = Sheets("Rec").Range("Q9:Y9")
Do Until InputRange.Item(1, 1).Value = ""
If InputRange.Item(1, 1).Value = Range("A1").Value Then
OutputRange.Item(1, 1).Value = InputRange.Item(1, 2).Value
OutputRange.Item(1, 3).Value = InputRange.Item(1, 4).Value
OutputRange.Item(1, 5).Value = InputRange.Item(1, 5).Value
Set InputRange = InputRange.Offset(1, 0)
Set OutputRange = OutputRange.Offset(1, 0)
Else
Set InputRange = InputRange.Offset(1, 0)
End If
Loop