- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¾Ç©f¤S¨Ó³Â·Ð¤j®a¤F
¥´¶} EXCEL Àɦ³¸Ô²Ó»¡©ú³á
½Ð«Óô/¬ü¤kª©¥D «Óô/¬ü¤k¾Çªø¸ò¾Ç©j
À°¦£¾Ç©f§¹¦¨
ÁÂ ...
metrostar µoªí©ó 2013-8-25 10:52 - Private Sub Worksheet_Change(ByVal Target As Range)
- Dim iCount1%, iCount2%, iI%
- Dim lRow As Long, lRows As Long, lTRow As Long
- Dim sMod1$, sMod2$
- Dim bUse As Boolean
-
- With Target
- Application.EnableEvents = False
- Range(.Offset(, 1), .Offset(10, 4)).Delete Shift:=xlShiftToLeft
- If .Row = 2 And .Column = 8 Then '[H2]
- With .Parent
- lRow = .Cells(Rows.Count, 1).End(xlUp).Row
- lRows = .Cells(Rows.Count, 5).End(xlUp).Row
- If lRow > lRows Then lRows = lRow
- lTRow = 0
- bUse = False
- For lRow = 2 To lRows
- If Trim(.Cells(lRow, 1).Text) = Trim(Target) Then
- Target.Offset(lTRow, 1) = .Cells(lRow, 2)
- Target.Offset(lTRow, 2) = .Cells(lRow, 3)
- bUse = True
- End If
-
- If Trim(.Cells(lRow, 5).Text) = Trim(Target) Then
- Target.Offset(lTRow, 3) = .Cells(lRow, 4)
- Target.Offset(lTRow, 4) = .Cells(lRow, 6)
- bUse = True
- End If
- If bUse Then lTRow = lTRow + 1
- Next lRow
- End With
- End If
- With Range(.Offset(, 1), .Offset(10, 4))
- .Interior.ColorIndex = 39
- .VerticalAlignment = xlCenter
- .HorizontalAlignment = xlCenter
- .Borders.LineStyle = xlContinuous
- End With
- Application.EnableEvents = True
- End With
- End Sub
½Æ»s¥N½X
metrostar201308-a.zip (11.25 KB)
|
|