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

[µo°Ý] §ïÅܯS©wÀx¦s®æÃC¦â

[µo°Ý] §ïÅܯS©wÀx¦s®æÃC¦â

½Ð±Ð¦U¦ì¤j¤j~
M1:M3  ¦³3­Ó¼Æ­È¡A·Q±qGÄæ´M§ä³o¤T­Ó¼Æ­È¡A§ä¨ì«á§Æ±æ±N³o¤T­Ó¼Æ­Èªº©Ò¦bÀx¦s®æÃC¦â§ï¬°¬õ¦â¡A¥H¤U¬O§Úªºµ{¦¡½X¡A¯àÀ°§Ú¬Ý¬Ý¡I

Dim bbb as string
Dim findstr As String
Dim findrng As Range
mmm = Chr(77)
FOR L=1 TO 3
        bbb=L
        findstr=range(mmm+bbb).value
        Set findrng = Cells.Find(what:=findstr, LookIn:=xlValues, LookAt:=xlWhole)
         findrng.Interior.Color = RGB(255, 0, 0)
Next L
Ä_Ä_

¦^´_ 1# caichen3
¤u§@ªí:  ³]©w®æ¦¡¤Æ±ø¥ó ¨BÆJ
¿ï¾Ü½d³ò [G3:G13]
«ü¥O: ®æ¦¡->³]©w®æ¦¡¤Æ±ø¥ó
±ø¥ó¤@ ¿ï¾Ü ¤½¦¡:=OR(G3=$M$1,G3=$M$2,G3=$M$3)
«ö¤U ®æ¦¡:  ¥i¿ï¾Ü ¦r«¬, ¥~®Ø, ¹Ï¼Ë  ³]©w¤§
  1. Option Explicit
  2. Sub Ex()   'Vba ³]©w®æ¦¡¤Æ±ø¥ó
  3.      With Sheet2.Range("G3:G13")
  4.         .FormatConditions.Delete
  5.         .FormatConditions.Add Type:=xlExpression, Formula1:= _
  6.         "=OR(G3=$M$1,G3=$M$2,G3=$M$3)"
  7.         .FormatConditions(1).Interior.Color = RGB(255, 0, 0)
  8.     End With
  9. End Sub
  10. Sub Ex1()  '­×§ï§Aªºµ{¦¡½X
  11.     Dim E As Range
  12.     With Sheet2
  13.         For Each E In .Range("G3:G13")
  14.             If E = .[M1] Or E = .[M2] Or E = .[M3] Then
  15.                 E.Interior.Color = RGB(255, 0, 0)
  16.             Else
  17.                 E.Interior.ColorIndex = xlNone
  18.             End If
  19.         Next
  20.     End With
  21. End Sub
½Æ»s¥N½X

TOP

½Ð°Ý¹w¥ý ³]©w®æ¦¡¤Æ±ø¥ó  ªº¥Øªº¬O¬°¤°»ò©O¡H
Ä_Ä_

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD