May 30th, 2012, 01:36 PM
Join Date: Nov 2011
Time spent in forums: 4 h 56 m 58 sec
Reputation Power: 0
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.
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"
On Error Resume Next
h = h + 1