- ©«¤l
- 315
- ¥DÃD
- 51
- ºëµØ
- 0
- ¿n¤À
- 367
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-9-29
- ³Ì«áµn¿ý
- 2021-10-12
|
VBA_°õ¦æ¶¥¬q¿ù»~ "1004" ªº×¥¿¡C
¥»©«³Ì«á¥Ñ Airman ©ó 2015-11-21 11:09 ½s¿è
°õ¦æ¨ì¦C9¼u¥X¡J
°õ¦æ¶¥¬q¿ù»~ "1004"
Class Range ªº Select¤èªk¥¢±Ñ
½Ð°Ý¡Jn¦p¦ó×¥¿? ÁÂÁÂ!
Private Sub CommandButton1_Click()
Dim J%, K%, tx%, ty%, tz%, b
With Sheets(2)
Sheets(1).Range("J7", "P" & Sheets(2).[R6] + 5).Copy .[J7]
tx = .[R7].End(xlDown).Row
ty = .[T5].End(xlToRight).Column
For tz = 20 To ty
.Range("T7:T" & tx).Select
For Each b In Selection
If b <> "" Then
For J = 10 To 16
For K = 10 To 16
If .Range("R" & b.Row) + 1 = .[T5] Then
If .Range("R" & b.Row) - .[T3] * 2 > 6 Then
If .Cells(.[T5] + 6, J) = .[R5] Then
If .Cells(.[T5] - 6, J) = .[R5] Then
If .Cells(.[T5] + 6, J) = .[R5] Then
With .Cells(.[T5] + 6, J): .Interior.ColorIndex = 4: .Font.ColorIndex = 3: .Font.FontStyle = "²ÊÅé": End With
With .Cells(.[T5] - .[T3] + 6, J): .Interior.ColorIndex = 45: .Font.ColorIndex = 3: .Font.FontStyle = "²ÊÅé": End With
With .Cells(.[T5] - .[T3] * 2 + 6, J): .Interior.ColorIndex = 8: .Font.ColorIndex = 3: .Font.FontStyle = "²ÊÅé": End With
End If
End If
End If
End If
End If
Next K
Next J
End If
Next b
Next tz
End With
[A1].Select
End Sub |
|