
May 30th, 2012, 12:36 PM
|
|
Registered User
|
|
Join Date: Nov 2011
Posts: 8
Time spent in forums: 4 h 56 m 58 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by cmorse723 The premise of my code is to run a macro after a user inputs the data then they can run the macro to lookup the text in cell B9 to B400 to find the # corresponded with that text on another sheet.
Right now i'm running it and just getting "Not found" in all my specified cells.
Any recommendations?
Code:
Public Sub vlookup()
Dim rng As Range
h = 9
Do While h < 400
Cells(h, 4).Value = Application.[VLookup(Worksheet("Resource Load Breakdown").Range(h, 2), Worksheet("PlanIT #'s").Range("A2:B400"), 2, True)]
If IsError(Cells(h, 4).Value) Then
Cells(h, 4).Value = "Not Found"
End If
On Error Resume Next
h = h + 1
Loop
End Sub
|
Any help?
|