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

[µo°Ý] «ç»ò¨ú¦³ÃC¦âÀx¦s®æ¤ºªº­È

[µo°Ý] «ç»ò¨ú¦³ÃC¦âÀx¦s®æ¤ºªº­È



½Ð±Ð¤j¤j­Ì,
¦p¦ó¼g¤@­Óvba ©Î¬Omacro ¿é¤JÀx¦s®æªºÃC¦â(¯»¦â),±Nsheet¤¤¬Û¦PÃC¦â(¯»¦â\Äæ¦ì),µM«á½Æ»s¨ì¥t¤@­Ósheet ¤¤.
     ½Ð¤j¤j­Ì«ü¾É.

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-8-14 14:55 ½s¿è

¦^´_ 1# sunland





¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim A As Range, A_Po As String
  4.     Dim AA As Range
  5.    
  6.     'FindFormat ÄÝ©Ê ³]©w©Î¶Ç¦^­n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
  7.     With Application.FindFormat
  8.         .Clear                      '²M°£¥H«eªº³]©w
  9.        ' .Interior.Color = vbred    '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
  10.         .Interior.ColorIndex = 3   '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
  11.        '.Font.Bold = True           '²ÊÅé
  12.        '.Font.Size = 12             '¦r«¬¤j¤p
  13.     End With
  14.    
  15.     Set A = Cells.Find("", AFTER:=Cells(Cells.Count), SearchFormat:=True) 'SearchFormat   ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
  16.     Do While Not A Is Nothing
  17.         If A_Po = "" Then
  18.             A_Po = A.Address
  19.             Set AA = A
  20.         End If
  21.         Set AA = Union(AA, A)
  22.         Set A = Cells.Find(What:="", AFTER:=A, SearchFormat:=True) '¤U¤@­Ó¬Û¦P®æ¦¡·j´M
  23.         If A_Po = A.Address Then Exit Do
  24.     Loop
  25.     If Not A Is Nothing Then AA.Copy Sheets("¥Ø¼Ð¤u§@ªí").Range("A1")
  26. End Sub
  27. Sub Ex_A()  '§äÃC¦â ColorIndex ¥i¦p¦¹±o¨ì
  28.     MsgBox Range("A1").Interior.ColorIndex
  29. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁ¤j¤jÀ°¦£.

§Ú°õ¦æ«á¦³¥X²{¤U¦C°T®§,§Ú­n¦A­×§ï¦ó³B?

TOP

§Ú¸ÕµÛ¥ÎMACRO¿ý»s¦³¦¨¥\¨úªºÀx¦s®æ(¬õ¦â)ªº­È.
³æ¤@¦æ¥i¥H¦¨¥\,¨º¦h¦æªº¸Ü­n«ç»ò­×§ï¨úªº¦h¦æªº­È.
½Ð¤j¤j¦A¦¸«ü¾É

  1. Sub Macro7()
  2. '
  3.      With Application.FindFormat.Interior
  4.         .PatternColorIndex = xlAutomatic
  5.         .Color = 255
  6.         .TintAndShade = 0
  7.         .PatternTintAndShade = 0
  8.     End With
  9.     Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
  10.         xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
  11.         , SearchFormat:=True).Activate
  12.     Sheets("Sheet1").Select
  13.     Range("A8:AJ8").Select
  14.     Selection.Copy
  15.     Sheets("Sheet2").Select
  16.     ActiveSheet.Paste
  17. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# sunland

¦A¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim A As Range, A_Po As String
  4.     Dim AA As Range, Sh As Worksheet
  5.    
  6.     'FindFormat ÄÝ©Ê ³]©w©Î¶Ç¦^­n´M§ä¤§Àx¦s®æ®æ¦¡Ãþ«¬ªº·j´M·Ç«h¡C
  7.     With Application.FindFormat
  8.         .Clear                      '²M°£¥H«eªº³]©w
  9.        ' .Interior.Color = vbred    '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
  10.         .Interior.ColorIndex = 3   '³]©wÀx¦s®æ¹Ï¼ËÃC¦â(¬õ¦â)
  11.        '.Font.Bold = True           '²ÊÅé
  12.        '.Font.Size = 12             '¦r«¬¤j¤p
  13.     End With
  14.     Set Sh = ActiveSheet
  15.     Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(Sh.Cells.Count), SearchFormat:=True) 'SearchFormat   ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
  16.     Do While Not A Is Nothing
  17.         If A_Po = "" Then
  18.             A_Po = A.Address
  19.             Set AA = A
  20.         End If
  21.         Set AA = Union(AA, A)
  22.         Set A = Sh.Cells.Find(What:="", AFTER:=A, SearchFormat:=True) '¤U¤@­Ó¬Û¦P®æ¦¡·j´M
  23.         If A_Po = A.Address Then Exit Do
  24.     Loop
  25.     If Not A Is Nothing Then AA.Copy Sheets("¥Ø¼Ð¤u§@ªí").Range("A1")
  26. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥X²{¬Û¦Pªº¿ù»~,  §Ú¨Ï¥Îªº¬Oexcel 2007 ¤£ª¾¹D¦³¨S¦³Ãö³s?

TOP

¦^´_ 6# sunland
¥X²{¬Û¦Pªº¿ù»~
¥i§_¤W¶Ç¦p³oÅã¥Ü¿ù»~ªºµe­±
©Î¬O¿ù»~½X


¥¼©R¦W.JPG
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2014/8/15 14:02): ½Ð¤W¶Ç³oµ{¦¡½XªºÀÉ®×

¤j¤j½Ð¦A¹L¥Ø.
ÁÂÁÂ

2014-08-15_114137.jpg

TOP

¦^´_ 8# sunland

§A¥i¥HÂI¤@¤U "°»¿ù" «ö¶s,
¥¦·|§i¶D§Aµo¥Í·¸¦ìªº¬O­þ­ÓÅܼÆ.
¦A±N¸ÓÅܼƪº¸ê®Æ«¬ºA½Õ¤j, (Åܧó Dim ªºÅܼƫŧi«¬ºA)
§Ú²q´ú¬O§A¨Ï¥Î¨Óªí¥Ü¦C¸¹ªºÅܼƫ¬ºA³]¤Ó¤p¤F (¦p : Integer)
¥Î©ó¦C¸¹ªºÅܼƫØij³]¬° Long ªº«¬ºA.

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2014-8-16 16:49 ½s¿è

¦^´_ 7# GBKEE
  1.     Set Sh = ActiveSheet
  2.     ' Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(Sh.Cells.Count), SearchFormat:=True) 'SearchFormat   ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
  3.     Set A = Sh.Cells.Find("", AFTER:=Sh.Cells(1), SearchFormat:=True) 'SearchFormat   ¿ï¾Ü©Êªº Variant¡C·j´Mªº®æ¦¡¡C
½Æ»s¥N½X
Sh.Cells(Sh.Cells.Count)=<·¸¦ì>
§ï¦¨Sh.Cells(1) «K OK ¤F¡C

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD