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

[µo°Ý] «ü©w¸¹½X¦b°¸¼ÆÄ檺Á`­Ó¼Æ¤Î©_¼ÆÄ檺Á`¦¸¼Æ

[µo°Ý] «ü©w¸¹½X¦b°¸¼ÆÄ檺Á`­Ó¼Æ¤Î©_¼ÆÄ檺Á`¦¸¼Æ

TEST.rar (6.25 KB)
C2= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B2ªºÁ`­Ó¼Æ
C3= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B3ªºÁ`­Ó¼Æ
¡J
¡J
C50= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B50ªºÁ`­Ó¼Æ


D2= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B2¤§©_¼ÆÄæÁ`¦¸¼Æ
D3= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B3¤§©_¼ÆÄæÁ`¦¸¼Æ
¡J
¡J
D50= (M$2¡JDF$50)ªº°¸¼ÆÄæ=B50¤§©_¼ÆÄæÁ`¦¸¼Æ

½Ð°Ý¡J
C2ªº¨ç¼Æ¤½¦¡ ?
D2ªº¨ç¼Æ¤½¦¡ ?
ÁÂÁÂ !

¦^´_ 21# samwang
§Ú¤£¬O·N¦b¤ñ¸û¼gªk~±z¥i¯à»~·|§Úªº·N«ä¤F

If..... Then......End If ¥u¯à¥Î¦b³æ¯Âªº»Ý¨D¡A
¶Q»yªkªº¾A¥Î½d³ò¼e¼s³\¦h~©Ò¥H¤~¤@¦A«_¬N¤jÂZ±z~©|½Ð¨£½Ì

«D±`ÁÂÁ±z­@¤ßªº«ü¾É©M¼ö¤ßÀ°¦£~·P®¦

TOP

¦^´_ 20# ziv976688

«á¾Ç¤]¬O¾Ç²ß¤¤¡A¨C­Ó¤H¼gªk¤£¤@©w³£¤@¼Ë¡A¥u­n¯à¼g¥X»Ý¨D¥\¯à´N¦n¡A·PÁ¡C

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-23 07:41 ½s¿è

¦^´_ 19# samwang
¤£¤Ó¯à²z¸Ñ±zªº·N«ä¡A
´M§ä = .[A4:A9] ¥B¦rÅéÃC¦â=7¸¹ªº¼Æ¦r¡A¨ú¥N¬°4¸¹©³¦â >> ³o¬O¤£¬O©M#16µ{¦¡»Ý¨D¤@¼Ë¶Ü?

¬Oªº!  ÁÂÁ±z
-----------------
¤£¦n·N«ä~
§Ú¥u·|³Ì°ò¥»ªº If..... Then......End If  ªº»yªk
EX :³o­Ó»Ý¨D¡A§Ú¥u·|~
Sub test()
Dim i%, j%, k%

With Sheets("Sheet1")
For i = 4 To 9
  For j = 2 To 50
    For k = 2 To 110
    If Cells(j, k).Font.ColorIndex = 7 Then
     If (Cells(j, k) = Cells(i, 1)) Then
      Cells(j, k).Interior.ColorIndex = 4
     End If
     If (Cells(j, k) = Cells(10, 1)) Then
      Cells(j, k).Interior.ColorIndex = 8
     End If
    End If
Next k
Next j
  Next i
End With
End Sub

¦]¬°«Ü·Q¾Ç²ß¶Q»yªk¡A©Ò¥H¤~«_¬N¤@ÃD³Ò·Ð±z³o»ò¦h¦¸~©|½Ð¨£½Ì
ÁÂÁ±z

TOP

¦^´_  samwang
S¤j¤j : ±z¦n !
¤£¦n·N«ä¡A¯à§_½Ð±z¥t¥~¦A«ü¾É~¥H´M§ä¡÷¨ú¥Nªº¤è¦¡¨Ó§¹¦¨»Ý¨D?
EX1¡G½d³ò ...
ziv976688 µoªí©ó 2021-8-23 00:15


¤£¤Ó¯à²z¸Ñ±zªº·N«ä¡A
´M§ä = .[A4:A9] ¥B¦rÅéÃC¦â=7¸¹ªº¼Æ¦r¡A¨ú¥N¬°4¸¹©³¦â >> ³o¬O¤£¬O©M#16µ{¦¡»Ý¨D¤@¼Ë¶Ü?

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-23 00:44 ½s¿è

¦^´_ 16# samwang
S¤j¤j : ±z¦n !
¤£¦n·N«ä¡A¯à§_½Ð±z¥t¥~¦A«ü¾É~¥H´M§ä¡÷¨ú¥Nªº¤è¦¡¨Ó§¹¦¨»Ý¨D?
EX1¡G½d³ò = .Columns("B:DF")¡A´M§ä = .[A4:A9] ¥B¦rÅéÃC¦â=7¸¹ªº¼Æ¦r¡A¨ú¥N¬°4¸¹©³¦â¡C
EX2¡G½d³ò = .Columns("B:DF")¡A´M§ä = .[A10] ¥B¦rÅéÃC¦â=7¸¹ªº¼Æ¦r¡A¨ú¥N¬°8¸¹©³¦â¡C
®¤¤p§Ì²Â©å~·í¼Ð¥Üªº½d³ò§ïÅܮɡA­ìµ{¦¡½Xªº¦UÃöÁä¼Æ¦r~§ÚµLªk½Õ¾ã¨ì§¹¥þ²Å¦X(Á`¦³½Ä¬ð)»Ý¨Dªº¼Æ¦r¡C
ÁÂÁ±z¡I

======================================
¦p¤U¦C¿ý»s¥H´M§ä©M¨ú¥Nªº¤è¦¡¤§µ{¦¡½X :  
With Sheets("Sheet1")
.Columns("B:DF").Select
    With Application.FindFormat.Font
        .FontStyle = "²ÊÅé"
        .Subscript = False
        .ColorIndex = 7
    End With
    Application.ReplaceFormat.Interior.ColorIndex = 8
    Selection.Replace What:=.[A10], Replacement:="", LookAt:=xlWhole, _
        SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=True, _
        ReplaceFormat:=True
End With

TOP

¦^´_ 16# samwang
§¹¥þOK¤F!
·PÁ±z

TOP

¦^´_ 15# ziv976688

Àx¦s®æ¤ÏÃC¦â¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Sub test()
Dim Arr, Brr
With Sheets("Sheet1")
    Arr = .[a1:a10]
    R = .Columns("M:V").Find("*", , , , , 2).Row
    Brr = .Range("M1:DF" & R)
    For i = 4 To UBound(Arr)
        If i < UBound(Arr) Then
            .Cells(i, 1).Interior.Color = 65280
            For j = 1 To UBound(Brr, 2) Step 2
            For i2 = 2 To UBound(Brr)
                If Brr(i2, j) = Arr(i, 1) Then
                .Cells(i2, j + 12).Interior.Color = 65280
                End If
            Next i2
            Next j
        Else
            .Cells(i, 1).Interior.Color = 16776960
            For j = 1 To UBound(Brr, 2) Step 2
            For i2 = 2 To UBound(Brr)
                If Brr(i2, j) = Arr(i, 1) Then
                .Cells(i2, j + 12).Interior.Color = 16776960
                End If
            Next i2
            Next j
        End If
    Next
End With
End Sub

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-22 14:34 ½s¿è

¦^´_ 13# samwang
¤£¦n·N«ä~Àµ½Ð±z¦A«ü¾É¨ú¥Nªº»yªk¡G
±NM:V = A4:A9¥B¬°7¸¹¦rÃCªº¼Æ¦r~¼Ð¥Ü4¸¹©³¦â
±NM:V = A10¥B¬°7¸¹¦rÃCªº¼Æ¦r~¼Ð¥Ü8¸¹©³¦â
ÁÂÁ±z¡I

Book1.rar (4.04 KB)

TOP

¦^´_ 13# samwang
OK¤F
ÁÂÁ±z¦h¦¸ªº¼ö¤ßÀ°¦£©M«ü¾É~·P®¦

TOP

        ÀR«ä¦Û¦b : ¯u¥¿ªº·R¤ß¡A¬O·ÓÅU¦n¦Û¤vªº³oÁû¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD