motabrasil
Member
Hi there
Masters of Excel, I need your help once again. I have a code that it's working almost perfect. However, I just note something is going wrong and I didn't figure out how to fix that. I'm using INSTR Function to search a name inside a group of names and execute some calculation if the string match. The problem here is the names between the groups are a little bit similar and this Instr Function is bringing a wrong data.
Question: Is there any other similar function that brings me the exact match?
Example:
Data Base from sheet6 Column "A".
A1 = Nissan
A2 = Nissancsv, Nissancou
A3 = Nissanrv
LastRow = 2
Do While sheet6.Cells(LastRow, "F") <> ""
strValue(1) = sheet6.Cells(LastRow, "F").Value
If InStr(Sheet6.Cells(lastrow, "A"), strValue(1)) Then
Sheet6.Cells(lastrow, 'B") = Sheet6.Cells(lastrow, "H")
End If
Loop
It seems the Instr Function do not consider those strings as different and put all of these strings in the same box.
Any idea?
Thanks in advance
Masters of Excel, I need your help once again. I have a code that it's working almost perfect. However, I just note something is going wrong and I didn't figure out how to fix that. I'm using INSTR Function to search a name inside a group of names and execute some calculation if the string match. The problem here is the names between the groups are a little bit similar and this Instr Function is bringing a wrong data.
Question: Is there any other similar function that brings me the exact match?
Example:
Data Base from sheet6 Column "A".
A1 = Nissan
A2 = Nissancsv, Nissancou
A3 = Nissanrv
LastRow = 2
Do While sheet6.Cells(LastRow, "F") <> ""
strValue(1) = sheet6.Cells(LastRow, "F").Value
If InStr(Sheet6.Cells(lastrow, "A"), strValue(1)) Then
Sheet6.Cells(lastrow, 'B") = Sheet6.Cells(lastrow, "H")
End If
Loop
It seems the Instr Function do not consider those strings as different and put all of these strings in the same box.
Any idea?
Thanks in advance