으로 A2 셀의 기능을 사용할 수 있습니다 예를 들어
Function matches(ByRef rngCell As Range, ByVal strSearch As String) As String
Dim astrWords As Variant
Dim strWord As Variant
Dim strResult As String
'Get the value from the cell and split into words based on the space seperator
astrWords = Split(CStr(rngCell.Value), " ")
strResult = ""
'Loop through the words and check if it contains the string that is searched for
For Each strWord In astrWords
If InStr(strWord, strSearch) Then
'Add it to the result if a match is found
If strResult <> "" Then
'Add a space when a previous match was found
strResult = strResult & " "
End If
strResult = strResult & strWord
End If
Next strWord
'Return the result
matches = strResult
End Function
, 당신은이 UDF를 사용할 수 있습니다
Public Function GETMATCHES(ByVal strOriginal As String, ByVal strMatch As String) As String
GETMATCHES = Join(Filter(Split(WorksheetFunction.Trim(strOriginal), " "), strMatch), " ")
End Function
A2 셀이 될 것이라고 그런 다음에 수식 : =GETMATCHES(A1,"in")
고마워 .. 그게 효과가 ... –