Previously, I’ve got this function to extract specific abbreviation in a column to other column,
Option Explicit
Function GetAbbrS(sDesc As String, rAbbr As Range)
Dim rCell As Range
For Each rCell In rAbbr
If InStr(sDesc, rCell.Value) 0 Then
GetAbbrS = rCell.Value
Set rCell = Nothing
Exit Function
End If
Next
GetAbbrS = CVErr(xlErrNA)
Set rCell = Nothing
End Function
But if I have 2 different abbreviation example YOG and YOGA, that only extract YOG for both abbreviation
Is there any suggest to modify?
Best regards,
Indra