I have the following function:
For l = 3 To 100 Step 2
Str3 = Worksheets(2).Cells(l, 1).Value
If Right(Str2, 7) = Right(Str3, 7) Then Worksheets(3).Range("C6").Value = Worksheets(2).Cells(l, 4).Value
Next l
This works quite well, however sometimes I have the case that the value of Str2 has left out two zeros at the end but I would still like to copy the value. I thought of something like:
If "Right(Str2, 7)*" Like "Right(Str3, 7)" Then Worksheets(3).Range("C6").Value = Worksheets(2).Cells(l, 4).Value
But that doesn't work. Do you guys have any idea?
For l = 3 To 100 Step 2
Str3 = Worksheets(2).Cells(l, 1).Value
If Right(Str2, 7) = Right(Str3, 7) Then Worksheets(3).Range("C6").Value = Worksheets(2).Cells(l, 4).Value
Next l
This works quite well, however sometimes I have the case that the value of Str2 has left out two zeros at the end but I would still like to copy the value. I thought of something like:
If "Right(Str2, 7)*" Like "Right(Str3, 7)" Then Worksheets(3).Range("C6").Value = Worksheets(2).Cells(l, 4).Value
But that doesn't work. Do you guys have any idea?