Hey guys,
I need some help with this code here.
It was working find until I accidentally stumbbled across a major issue. First of all myrange is selected via input box and it contains a list of activity codes. Now my macro uses the values in myrange to get coressponding values from another excel workbook. The issue I'm running across is the fact that in myrange there are codes which are very similiar (ie. PR4500 vs. PR45001). My macro is have trouble distinguishing between the two due to the fact that the first 6 characters are identical. I was wondering if there was a way to find EXACT value in myrange. I was thinking something like
, but that didn't work for me =P. I hope someoen has a solution they would like to share. Thanks in advance and hope everyone is having a great weekend.
Cheers,
Noobsauce
I need some help with this code here.
Code:
For l = 1 To myrange.Rows.Count
'looking for MRQ
Set rngFndb = .Columns(mrq).Find(myrange(l, 1))
If rngFndb Is Nothing Then
k = 0
Else
k = rngFndb.Row
It was working find until I accidentally stumbbled across a major issue. First of all myrange is selected via input box and it contains a list of activity codes. Now my macro uses the values in myrange to get coressponding values from another excel workbook. The issue I'm running across is the fact that in myrange there are codes which are very similiar (ie. PR4500 vs. PR45001). My macro is have trouble distinguishing between the two due to the fact that the first 6 characters are identical. I was wondering if there was a way to find EXACT value in myrange. I was thinking something like
Code:
Set rngFndb = .columns(mrq).find(what:=myrange(l,1), after:=.cells(1,1), lookin:=xlValues, looat:=[B]xlWhole[/B], searchorder:=xlbyrows, searchdirection:=xlNext, matchcase:=false)
Cheers,
Noobsauce