å¯ä»¥ç¨èªå®ä¹å½æ°ï¼vbaï¼
æalt+f11 å³é®æ°å»ºä¸ä¸ªæ¨¡å
ç²è´´ä»¥ä¸ä»£ç
Function æ¥æ¾ç¸å(rg1 As Range, rg2 As Range)
For i = 1 To Len(rg1.Value)
If InStr(rg2, Mid(rg1.Value, i, 1)) > 0 Then
a = a & Mid(rg1, i, 1)
End If
Next
æ¥æ¾ç¸å = a
End Function
ååå°excelçé¢ï¼åå
¬å¼=æ¥æ¾ç¸å(A1,B1)
å³å¯æ¥åºç»æ
èå¤ææ¯å¦ä¸è´ï¼åéè¦
=IF(OR(ISERROR(FIND(A1,B1,1)),ISERROR(FIND(B1,A1,1))),"ä¸æ ·","ä¸ä¸æ ·")
æè
=IF(OR(ISNUMBER(FIND(A1,B1,1)),ISNUMBER(FIND(B1,A1,1))),"ä¸æ ·","ä¸ä¸æ ·")
两个é½å¯ä»¥
FIND(A1,B1,1)左边æ¯å¦å
å«å³è¾¹
FIND(B1,A1,1)å³è¾¹æ¯å¦å·¦è¾¹
ISNUMBER(FIND(A1,B1,1)
å¦ææ¯æ°å说æå¯ä»¥æ¾çå°å°±æ¯è¯´å
å«
ä¸ç®¡æ¯åªè¾¹å
å«åªè¾¹åªè¦æä¸ä¸ªç¬¦åæ¡ä»¶å°±è¯´æä¸æ ·æ以ç¨ä¸ä¸ªor
æåç¨ä¸ä¸ªifå°±å¯ä»¥äº
温馨提示:答案为网友推荐,仅供参考