ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

¦p¦ó³]©wÀx¦s®æ³¡¤À¦r¦êªºÃC¦â

¦p¦ó³]©wÀx¦s®æ³¡¤À¦r¦êªºÃC¦â

Dear ¦U¦ì¥ý¶i,
¦bºô¸ô¤W¦³§ä¨ì³]©wÀx¦s®æ³¡¤À¦r¦êªºÃC¦âªºVBA»yªk(¦p¤U)
³o»yªkÃöÁä¦r¦ê¬° " / "
§Ú·Q§ï¦¨ÃöÁä¦r¦ê¬° " ­ÜºÞ½Ò " ¡A¨º§Úªº»yªk¸Ó¦p¦ó­×§ï©O¡HÁÂÁ¦U¦ì


'³o­ÓÅý§A·s¥´ªº¤º®e©Ò¦³"/"³£Åܬõ
Private Sub Worksheet_Change(ByVal Target As Range)
    '¥ý±N¦rÅé³£§ï¦¨¶Â
    Target.Font.ColorIndex = xlAutomatic
    '±N©Ò¦³"/"³£Åܬõ
    redSlash Target
End Sub



'§ó§ï"/"ÃC¦â¬°¬õ¦â
'¤Þ¼Æ¬°¿ï¾Ü°Ï©Î¿é¤J°ÏÀx¦s®æ
Sub redSlash(Target As Range)
Dim Rng As Range            'Àx¦s®æ¯Á¤Þ
Dim i As Long, j As Long    'i ¬°ªð¦^¦ì¸m, j ¬°·j´M¤ñ¹ï°_©l¦ì¸m
'¹M¾ú°Ï°ì©Ò¦³Àx¦s®æ
For Each Rng In Target.Cells
    '·j´M°_©l¦ì¸m
    j = 1
    With Rng
        Do      '¤@ª½§ä¨ì¨S¦³"/"
            '´M§ä"/"¦ì¸m
            i = VBA.InStr(j, .Text, "/")
            '¦pªG§ä¨ì±N¨º­Ó"/"¦r§ï¬°¬õ¦â
            If i > 0 Then .Characters(i, 1).Font.ColorIndex = 3
            '²¾°Ê¤U¦¸·j´M¦ì¸m
            j = i + 1
        Loop While i > 0
    End With
Next
End Sub
Just do it.

¦^´_ 4# jcchiang
¤F¸Ñ¡AÁÂÁ±zªº«ü¾É¡I
Just do it.

TOP

¦^´_ 3# jsc0518
¤£¥Î,¨º¥u¬Oµù¸Ñ³o¬qµ{¦¡ªº¥Îªk

TOP

¦^´_ 2# jcchiang

±z¦n¡I·PÁ±zªº¦^ÂСATEST OK¡C

½Ð°Ý¤@¤U¡A¨º³o¤@¬q»yªk¤¤ªºredSlash Target¤£¬O«ü»¡±N©Ò¦³"/"³£Åܬõ

¬O§_»Ý­×§ï©O¡H



Private Sub Worksheet_Change(ByVal Target As Range) '³o­ÓÅý§A·s¥´ªº¤º®e©Ò¦³"/"³£Åܬõ

    Target.Font.ColorIndex = xlAutomatic  '¥ý±N¦rÅé³£§ï¦¨¶Â
    redSlash Target '±N©Ò¦³"/"³£Åܬõ
   
End Sub
Just do it.

TOP

¦^´_ 1# jsc0518
           i = VBA.InStr(j, .Text, "­ÜºÞ½Ò")           
         If i > 0 Then .Characters(i, 3).Font.ColorIndex = 3

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD