- ©«¤l
- 21
- ¥DÃD
- 4
- ºëµØ
- 0
- ¿n¤À
- 35
- ÂI¦W
- 0
- §@·~¨t²Î
- WINXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 10
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2016-2-3
|
·PÁ¦U¦ì¤j¤jªºÀ°¦£, ¸Õ¤F¦h¦¸²×©ó¦¨¥\.
«Ý¨úªº¬õ¦âÀx¦s®æ
¨úªº¬õ¦âÀx¦s®æ
- Option Explicit
-
- Sub Ex()
-
- Dim A As Range, A_Po As String
- Dim AA As Range, Sh As Worksheet
-
- 'FindFormat ÄÝ©Ê ³]©w©Î¶Ç¦^n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
-
- With Application.FindFormat
-
- .Clear '²M°£¥H«eªº³]©w
-
- .Interior.Color = vbRed '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
-
- ' .Interior.ColorIndex = 3 '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
-
- '.Font.Bold = True '²ÊÅé
-
- '.Font.Size = 12 '¦r«¬¤j¤p
-
- End With
-
- 'Set Sh = ActiveSheet
-
- 'Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(Sh.Cells.Count), SearchFormat:=True) 'SearchFormat ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
-
- Set Sh = ActiveSheet
-
- '2003-> Sh.Cells.Count ¬O¨S¿ù»~ªº
- ' Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(Sh.Cells.Count), SearchFormat:=True) 'SearchFormat ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
-
- Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(Sh.Cells.Rows.Count, Sh.Cells.Columns.Count), SearchFormat:=True) 'SearchFormat ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
-
-
-
-
- Do While Not A Is Nothing
-
- If A_Po = "" Then
-
- A_Po = A.Address
-
- Set AA = A
-
- End If
-
- Set AA = Union(AA, A)
-
- Set A = Sh.Cells.Find(What:="", AFTER:=A, SearchFormat:=True) '¤U¤@Ó¬Û¦P®æ¦¡·j´M
-
- If A_Po = A.Address Then Exit Do
-
- Loop
-
- If Not A Is Nothing Then AA.Copy Sheets("Sheet2").Range("A1")
-
- End Sub
½Æ»s¥N½X Àx¦s®æªºÃC¦â¥Î .Interior.Color = vbRed '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â) ,´N¯à§ä¨ì.
¦ý¥Î' .Interior.ColorIndex = 3 '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â) ´N¥¢±Ñ(§ä¤£¨ì¬ÛÃöÃC¦â.)
¦pªG¬O¥Î¯à input = ÃC¦â ¥N¤J·íÅÜ¼Æ ¥i¦æ¶Ü? À³¸Ó«ç»ò°µ?
½Ð¦A¦¸«ü¾É.
·PÁÂ |
|