I have several cells with random characters
- 123456- foo # 1 -rfjas1
- 123456rfja- foo # 1 -s1
- 1- foo # 2 -23456rfjas1
- 123- foo # 3 -456rfjas1
- 123456rf- foo # 3 -jas1
I should look for the values foo # N these I have stored in a range
- foo # 1
- foo # 2
- foo # 3
- foo # 4
I need to look up all the values in the foo # N list within each cell in the list above.
perform a function to return this value
Function BuscarFixed(texto As Range, listado As Range) As String
Dim i As Long
For i = 1 To listado.Rows.Count
If IsError(Application.WorksheetFunction.Find(listado.Cells(i, 1).Value, texto)) Then
Else
BuscarFixed = Application.WorksheetFunction.Find(listado.Cells(i, 1).Value, texto)
Exit For
End If
Next i
End Function
But it does not work, how can I search a cell for each value in a list and return the found value if it exists? I would greatly appreciate your help.