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

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

¦^´_ 7# linshin1999


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

TOP

¦^´_ 5# oobird


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

TOP

¦^´_ 10# Hsieh


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

TOP

¥»©«³Ì«á¥Ñ 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

¦^´_ 14# FAlonso


§A¦n~
½Ð°Ý§Ú°õ¦æ§¹²Ä¤@­Óµ{¦¡½X¥L¶]¥Xªº°T®§¬O"4142"³o¬O¤°»ò·N«ä?!
ÁÂÁ§Aªº¦^µª!
^^

TOP

¦^´_  FAlonso


§A¦n~
½Ð°Ý§Ú°õ¦æ§¹²Ä¤@­Óµ{¦¡½X¥L¶]¥Xªº°T®§¬O"4142"³o¬O¤°»ò·N«ä?!
ÁÂÁ§Aªº¦^µª! ...
candy516 µoªí©ó 2011-1-17 18:05

«ü®æ¤l¬O"µL¶ñº¡".§Ydefaultªºcolor index
¸Óµ{¦¡¬O°»¹î¥X¶À¦âªº½s¸¹,¤£¥Î²q
§Ú²Ä¤G­Óµ{¦¡,§Aı±o«ç¼Ë?
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ linshin1999 ©ó 2011-1-17 19:26 ½s¿è

candy©p¦n:§Ú¾Ç·|¤F¨ú±oÀx¦s®æÃC¦âªº¤èªk,¦pªG¤@©w­n¥ÎÃC¦â§äªº¸Ü,¥i¥H¸Õ¸Õ¬Ý:

Dim mycolor As long
      mycolor = Activecell.Interior.color

¦p¦¹©p´N¥i¥H¨ú±o¥Ø«eÀx¦s®æªºÃC¦â,µM«á±N³o­Ó­È±a¶i¥h¤ì¤uª©¥Dªºµ{¦¡¥h¸Õ¸Õ¬Ý§a!
Sub YY()
Application.FindFormat.Interior.ColorIndex = Activecell.Interior.color
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

­ì¨Ó¤w¸g§ä¨ìµª®×¤F,§Ú没¦³¬Ý¨ìÁÙ¦³²Ä¤G­¶,¯u¤£¦n·N«ä,¥i¬O¤w¸g¦¬¤£¦^¨Ó¤F,¤£¹L¤]¾Ç·|¤F¦p¦ó¨ú±oÀx¦s®æªºÃC¦â!
V98

TOP

¦^´_ 16# FAlonso


³á~­ì¨Ó¬O³o­Ó·N«ä§r!
²Ä¤G­Óµ{¦¡¤]«Ü¼F®`­C!
¤j®a³£¦n¼F®`­ò!
^^

TOP

¦^´_ 17# linshin1999


    linshin1999 §A¦n~
¤]¬O«D±`ÁÂÁ§A§i¶D§Ú¥t¤@ºØ¤èªk!
¤j®aªº³£¦n¦³­@¤ßªº¦^µª§Ú!
ÁÂÁ§A­Ì!

TOP

¦^´_  FAlonso


³á~­ì¨Ó¬O³o­Ó·N«ä§r!
²Ä¤G­Óµ{¦¡¤]«Ü¼F®`­C!
¤j®a³£¦n¼F®`­ò!
^^
candy516 µoªí©ó 2011-1-17 21:34

Ãö©ó¨º­Ó¶ñÅv¤é¼Æ,§Ú¿ð¨Ç¼g¤@­Óµ{¦¡µ¹§A
80 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¤£¤@©w²y²y¬O¦n²y¡A¦ý¬O¦³¾ú½mªº±j¥´ªÌ¡AÀH®É³£¥i¥H´§´Î¡C
ªð¦^¦Cªí ¤W¤@¥DÃD