- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
     
|
¦^´_ 5# samwang
§A¤ñ¸û²Ó¤ß¡A½T¹ê¦³¥i¯à2Ó¸¹½X¦b«e«á¤£¦P¦a¤è
§Úì¥ýµ{¦¡×§ï¦ì¸m *1 *2 *3
Sub test()
' ²M°£¦rÃC¦â¤Î²ÊÅé
With Range("B3:C" & [C65536].End(xlUp).Row).Font
.ColorIndex = xlAutomatic
.Bold = False
End With
Set xB = [b3]
Set xC = [c3]
While xB <> ""
If xB.Value <> xC.Value Then
Call NotFindChar(xB, xC)
Call NotFindChar(xC, xB)
End If
Set xB = xB(2, 1)
Set xC = xC(2, 1)
Wend
Debug.Print "time", Time
End Sub
Sub NotFindChar(xC, xS)
ArrC = Split(xC.Value, ",")
nStart = 1 '*1
For i = 0 To UBound(ArrC)
If InStr("," & xS & ",", "," & ArrC(i) & ",") = 0 Then
nS = InStr(nStart, "," & xC & ",", "," & ArrC(i) & ",") '*2
nL = Len(ArrC(i))
' Range("b3").Characters(pos, L).Font.ColorIndex = 3
' Cells(3, i + 2).Characters(j, ln).Font.Color = vbRed
With xC.Characters(Start:=nS, Length:=nL).Font
.FontStyle = "²ÊÅé"
.Color = vbRed '¬õ¦â -16777024
End With
End If
nStart = nStart + nL + 1 '*3
Next
End Sub |
|