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

½Ð°Ý¡G¦p¦ó´M§ä¶À¦â©³¦âªºÀx¦s®æ?!

¥»©«³Ì«á¥Ñ FAlonso ©ó 2011-1-17 17:22 ½s¿è

­º¥ý¸Ñ¨M®æ¤l©³¦â°ÝÃD
¥Î¤U¦Cµ{¦¡¸Õ¸Õ¨äÃC¦â½s¸¹
  1. Sub abc()
  2. Dim i
  3. i = Sheet1.Range("A1").Interior.ColorIndex '­×§ï¥Ø¼Ð¦a§}
  4. MsgBox i
  5. End Sub
½Æ»s¥N½X
µM«á
  1. Option Explicit
  2. Sub choosesheet()
  3. Dim myyear As String, mystock As String
  4. Dim myfind As Range, myrange As Range, mycell As Range

  5. thisworkbook.activate

  6. myyear = Application.InputBox(myyear, "Enter year")

  7. If IsNumeric(myyear) Then
  8.     If myyear < 2001 Or myyear > 2010 Then
  9.     MsgBox "Out of Range"
  10.     Exit Sub
  11.     Else
  12.     Sheets(myyear).Activate
  13.     End If
  14. Else
  15. MsgBox "Not A Number"
  16. Exit Sub
  17. End If

  18. mystock = Application.InputBox(mystock, "Enter Stock Name")

  19. With Sheets(myyear)
  20. Set myfind = .Rows(1).Find(what:=mystock, after:=.[b1], lookat:=xlPart)
  21. If myfind Is Nothing Then
  22. MsgBox "No Findings"
  23. Else
  24. Set myrange = .Range(myfind, myfind.End(xlDown))

  25. For Each mycell In myrange
  26. If mycell.Interior.ColorIndex = 6 Then
  27. mycell.Activate
  28. Exit For
  29. End If
  30. Next

  31. End If
  32. End With
  33. End Sub
½Æ»s¥N½X
¿é¤J¦~¥÷¤Î¨äªÑ²¼¥N¸¹©Î¦WºÙ,¸Óµ{¦¡«K·|¥h¨ì«ü©w¶À¦¡®æ¤l
½ÐªÖ©w¨C­Ócolumn¥u¦³¤@­Ó¶À¦â®æ¤l¦Ó¤w,¦pªG¤£¬O¦¹µ{¦¡»Ý­n§@­×§ï,Ãþ¦üfindnext + loop xxxx<>xxx.address¤§Ãþªº
¦³°ÝÃD¦Acall§Ú
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 10# Hsieh


    ­ì¨Ó2003©M2007ÁÙ¦³³o¼Ëªº¤À§O°Ú!
¹ï©ó§Ú³o¼Ëªºªì¾ÇªÌ¨Ó»¡¡AÅý§Ú¦³¦h¾Ç·|¤@­Óª¾ÃÑ!
¯u¬O¦hÁ«§AªºÀ°¦£!^^

TOP

¦^´_ 5# oobird


    ÁÂÁ§AªºÀ°¦£!

TOP

¦^´_ 7# linshin1999


    ¬OColorIndex ¬O6¨S¦³¿ù!
   
    ¯u¤ßªºÁÂÁ§AªºÀ°¦£!

TOP

¦^´_ 4# candy516

¦]¬°2007»P2003¹ïÃC¦âªº³]©w®t§O¬Û·í¤j
©Ò¥H°£«D§A¬O¥HÀx¦s®æ®æ¦¡°µ·j´M
­Y¥Hcolorindex­È·j´M´N·|¥¢¥h·Ç½T©Ê
©Ò¥H¦b©p¥t¤@©«¤¤§Ú¥Hsheet1¼Æ¾Ú¨Ó·j´M·|¤ñ¸û·Ç½T
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 8# oobird


    Á¤F!!
V98

TOP

¤ì¤uª©¥D§A¦n:¦³Ãö Interior.ColorIndex ¨º¸Ì¥i¥H§ä¨ì List, ¦pªGª¾¹D½Ð§iª¾,ÁÂÁÂ!!
linshin1999 µoªí©ó 2011-1-17 09:25



    For I = 1 To 56
Cells(I, 1).Interior.ColorIndex = I
Next
³o¼Ë¶]¤@¤U´N¦³¤F

TOP

¦^´_ 4# candy516


    candy©p¦n:­º¥ý©p­n½T©w ColorIndex ¬O¤£¬O¤ì¤uª©¥D©Ò´£¨Ñªº "6", ¦]¬°¶À¦â¦³«Ü¦hºØ¶À,¦pªG¬O¦b³o¸Ì¥X°ÝÃD¨º¥i·|Åý©p¥Õ¦£¤F,¬Ý¤F¤ì¤uª©¥Dªºµ{¦¡À³¸Ó没°ÝÃD,§Ú´£¨Ñµ¹©pªº¬O¤w¸gª¾¹DÀx¦s®æªº¤º®e,©Ò¥H¥Î "ÂE®ü" ¥h§ä, ¦]¬°©p¨Ã没´£¨Ñ ColorIndex ­È, ©p¤]¥i¥H¥Î¤ì¤uª©¥Dªºµ{¦¡,µM«á±N ColorIndex §ï¤@§ï¸Õ¸Õ¬Ý.
V98

TOP

¤ì¤uª©¥D§A¦n:¦³Ãö Interior.ColorIndex ¨º¸Ì¥i¥H§ä¨ì List, ¦pªGª¾¹D½Ð§iª¾,ÁÂÁÂ!!
V98

TOP

Sub YY()
Application.FindFormat.Interior.ColorIndex = 6
With ActiveSheet
For i = 1 To .Columns.Count
Set c = .Columns(i).Find(What:="", After:=.Cells(65536, i), SearchDirection:=xlNext, SearchFormat:=True)
If Not c Is Nothing Then MsgBox c.Address
Next
End With
End Sub

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD