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

[µo°Ý] Office VBA¡A¦b½d³ò¤º·j´M¦³µL§R°£½u¨ÃÅܦâ

[µo°Ý] Office VBA¡A¦b½d³ò¤º·j´M¦³µL§R°£½u¨ÃÅܦâ

¤p§Ì¡A³o¼Ë¼g¤§«á¡A¨Ã¨S¦³¤ÏÀ³....
¤£ª¾¹D¬O­þ­ÓÀô¸`¥X¿ù¤F¡AÁٽЦU¦ì¤j¤j¥i¥HÀ°¦£¬Ý¤@¤U¡C

·j´M¯S©w½d³ò¤º¬O§_¦³ "§R°£½u"¡A§ä¨ì¤F´N±NÀx¦s®æÅܦâ

Sub test2()
With Worksheets(1).Range("a1:w100")
Set c = .Find(.Font.Strikethrough, LookIn:=xlValues)
If Not c Is Nothing Then
firstaddress = c.Address
Do
c.Font.Color = rgbRed
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstaddress
    End If
    End With
End Sub

´M§ä¥\¯à¡A¥i·j´M¨ã§R°£½uªºÀx¦s®æ







TOP

¦^´_ 2# joblyc017


¨Ï¥Î¤è­±ÁÙº¡¤£¿ù¡ã
¦]¬°·Q¹F¨ì¡A¦Û°Ê§P§O¨ÃÅܦâ¡C
©Ò¥H«áÄò§ä¨ì¤U¦C¤è¦¡¡J
  1. Sub test()
  2.     Dim c As Range, x As Long
  3.     For Each c In Range("o4:w181")
  4.     For x = Len(c.Value) To 1 Step -1
  5.     If c.Characters(x, 1).Font.Strikethrough Then
  6.                     c.Interior.Color = rgbRed
  7.                     Else
  8.                     c.Interior.Color = rgbWhite
  9.                 End If
  10.             Next
  11.             Next
  12.     End Sub
½Æ»s¥N½X
¤£¹L¦]¬°§P§O½d³ò¸û¤jªº¸Ü¡A·|³y¦¨lag...©Ò¥H«áÄò©ñ±ó... ...

TOP

¦^´_ 3# »a³·

¶Q¦¡¥H³Ì«á¤@­Ó¦r¬O§_¦³§R°£½u¨M©w¤Ï¬õ?


­Y¬O¨ä¤¤¤@¦r¦³§R°£½u´N¤Ï¬õ¡A¥i°Ñ¦Ò¦p¤U
Sub test0()
    Dim c As Range, x As Long, S%
    For Each c In Range("a1:k30") 'Range("o4:w181")
        S = 0
        For x = Len(c.Value) To 1 Step -1
            If c.Characters(x, 1).Font.Strikethrough Then S = S + 1
        Next
        If S > 0 Then
            c.Interior.Color = rgbRed
        Else
            c.Interior.Color = rgbWhite
        End If
    Next
End Sub
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 4# ML089


³o­Ó®t§O¦b­þÃä©O¡H
¸Õ¥Î«á¡A§PÂ_«D±`ªº¨³³t
S%ªº³¡¥÷¡A¥H¤Î «á­±ªº S=S+1

©êºp¡A§Ú³B©óªì¾Ç³¡¥÷¡AÁٻݭn¤j®aªº«ü¾É¡ã

TOP

¦^´_ 5# »a³·

¶Q¦¡§PÂ_¬O¥Ñ§À¦ÜÀY¨C­Ó§PÂ_¡A©Ò¥H³Ì«á²Ä¤@­Ó¦rÅܦ¨±±¨î¬O§_­n¤Ï¬õªº±±¨î¡A
§A¥i¥H´ú¸Õ§R°£½u¬O²Ä¤G­Ó¦r¥H«á
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 6# ML089

©êºp¡A§Ú·Q°Ýªº¬O

S%ªº³¡¥÷¬O¦b³B²z¤å¦r»Ý­n²Ä´X­Ó¡H
­Y¬O§PÂ_¤å¦r²Ä2­Ó¡A«h §ï¦¨ S=S+2¡A³o¼Ë¶Ü¡H
«h If S>0 §ï¦¨ >1¡H

Áٳ·ЧA«ü¾É¤F¡AÁÂÁ¡C

TOP

¦^´_ 7# »a³·

©êºp¡A§Ú·Q°Ýªº¬O

S%ªº³¡¥÷¬O¦b³B²z¤å¦r»Ý­n²Ä´X­Ó¡H
­Y¬O§PÂ_¤å¦r²Ä2­Ó¡A«h §ï¦¨ S=S+2¡A³o¼Ë¶Ü¡H
«h If S>0 §ï¦¨ >1¡H


S = S +1 , ²Ö¥[­pºâ¤@±ø¤å¦r¤¤¦³´X­Ó¦r¦³§R°£½u¡A
·íS=0®Éªí¥Ü¨S¦³¦r¨S¦³§R°£½u¡A­YS>0ªí¥Ü¤@±ø¤å¦r¤¤¦³´X­Ó¦r¦³§R°£½u¡C


¶Qµ{¦¡¬OÀˬd¨C­Ó¦r´N°µ¤@¦¸¤å¦r¤Ï¥Õ¤Ï¬õ³B²z¡A©Ò¥H³B²z¤ñ¸û¤[¤@ÂI¡C
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 8# ML089


­ì¨Ó¬O³o¼Ë¡AÁÂÁ«ü¾É¡ã

TOP

        ÀR«ä¦Û¦b : ªY½à§O¤H´N¬O²øÄY¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD