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

®æ¦¡¤Æ±ø¥ó

®æ¦¡¤Æ±ø¥ó

¦U¦ì«e½ú¤j®a¦n

½Ð°Ý¤j®a,·Q§âAÄ檺¸ê®ÆÀx¦s®æ¦pªG¦³¥]§tFÄ檺¸ê®Æ´NÅܦ¨¶À¦â,¥Ø«e¥d¦b§ìF2Äæ¦ì¤£·|Åܦâ,,Àµ½Ð¦U¦ìÀ°¦£,·PÁÂ..¨ó§U


    Worksheets(1).Columns("A:A").Select
    For d = 1 To 2
    Selection.FormatConditions.Add Type:=xlTextString, String:= _
        Range("F" & d), TextOperator:=xlContains
        S = Range("F" & d)
        MsgBox S
                    For i = 1 To 1
                        With Selection.FormatConditions(i).Interior
                        .PatternColorIndex = xlAutomatic
                        .Color = 65535
                        .TintAndShade = 0
                        On Error Resume Next
                        End With
                    Next
                    i = 0
    Next d
    'Selection.AutoFilter
    'ActiveSheet.Range("$A$1:$A$5000").AutoFilter Field:=1, Criteria1:=RGB(255 _
    '    , 255, 0), Operator:=xlFilterCellColor
        On Error Resume Next

Scription.rar (18.97 KB)

¦^´_ 1# s13983037
¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range
  4.     With Worksheets(1).Columns("A:A")
  5.         .Parent.Activate
  6.         Set Rng = .Range("F1")
  7.         Set Rng = .Range(Rng, Rng.End(xlDown))
  8.         .FormatConditions.Delete
  9.         With .SpecialCells(xlCellTypeConstants)
  10.             .Cells(1).Select
  11.             .FormatConditions.Add Type:=xlExpression, Formula1:="=MATCH(" & .Cells(1).Address(0, 0) & "," & Rng.Address(1, 1) & ",0)>0"
  12.             With .FormatConditions(1).Interior
  13.                 .ColorIndex = 6
  14.                 .PatternColorIndex = xlAutomatic
  15.             End With
  16.         End With
  17.     End With
  18. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

GBKEE«e½ú±z¦n
§Ú·Q­n³W¹ºªº¼Ë¤l ¬O¦p¹Ï1  , ¦pªGFÄ椤ªº"AA"¹ïÀ³¨ì AÄ椤ªº "AAB"ªº¸Ü´N,µLÅܧóÃC¦â,¦ý¦pªG¹ïÀ³¨ì"AA c"ªº¸Ü,·|¹ïÀ³¨ìÃC¦â...Ãþ¦ü¹Ï2³o¼Ëªº,®æ¦¡¤Æ±ø¥ó¬O¥H¯S©w¤å¦r¹ïÀ³...¨ìFÄæ,³Â·Ð±z¬°¤p§Ì«üÂI°g¬z,«D±`·PÁ±z¤F{:3_59:}

¹Ï1
  


¹Ï2

Scription.rar (19.2 KB)

TOP

¦^´_ 3# s13983037
­n»¡²M·¡,¥u­nAÄæ¨C¤@Àx¦s®æªº¦r¦ê¶}ÀY¦bFÄ椤¦³¥X²{´NÅܦâ
ThisWorkbookª«¥ó¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Private Sub Workbook_Open()
  3.     Run "SHEET1.Auto_Open", Range("A:A")
  4.     'SHEET1: Worksheet(1)->VBAªºª«¥ó¦WºÙ
  5.     '§A¥i­×§ï
  6. End Sub
½Æ»s¥N½X
SHEET1ª«¥ó¼Ò²Õªºµ{¦¡½X
  1. Option Explicit
  2. Dim Rng As Range, Ar
  3. Private Sub Worksheet_Change(ByVal Target As Range)
  4.     Dim R
  5.     If Rng Is Nothing Then Set_Rng
  6.     If Intersect(Target, Rng) Is Nothing Then
  7.         Auto_Open [a:a]
  8.     ElseIf Not Intersect(Target, Rng) Is Nothing Then
  9.         If Ar(Target.Row, 1) <> Target Then
  10.             With Range("a:a").SpecialCells(xlCellTypeConstants)
  11.                 For Each R In .SpecialCells(xlCellTypeConstants)
  12.                     If UCase(R) Like UCase(Target & "*") Then
  13.                         R.Interior.ColorIndex = 6
  14.                     Else
  15.                         R.Interior.ColorIndex = xlNo
  16.                     End If
  17.                    Next
  18.             End With
  19.         End If
  20.         Ar = Rng.Value
  21.     End If
  22. End Sub
  23. Private Sub Set_Rng()
  24.     Set Rng = Range("F1")
  25.     Set Rng = Range(Rng, Rng.End(xlDown))
  26.     Ar = Rng.Value
  27. End Sub

  28. Private Sub Auto_Open(Sheet_Rng As Range)
  29.     Dim E As Range, R As Range
  30.     Set_Rng
  31.     With Sheet_Rng
  32.         .Interior.ColorIndex = xlNo
  33.         If Application.CountA(.Cells) > 0 Then
  34.             For Each E In Rng
  35.                 For Each R In .SpecialCells(xlCellTypeConstants)
  36.                     If UCase(R) Like UCase(E) & "*" Then
  37.                         R.Interior.ColorIndex = 6
  38.                     End If
  39.                 Next
  40.             Next
  41.         End If
  42.     End With
  43. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ·O´d¨S¦³¼Ä¤H¡A´¼¼z¤£°_·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD