½Ð¸û¦U¦ì¤j¤j:¦¹¬qµ{¦¡¬O¤§«e«e½ú´£¨Ñªºµ{¦¡,¥\¯à¬O§PÂ_sheet1 CÄ檺ªÑ²¼¦¨¥æ¶q³Ì·s¤@µ§Åܰʸê®Æ,Y>100,«h±Nsheet1 CÄ檺ªÑ²¼¦¨¥æ¶q³Ì·s¤@µ§Åܰʸê®Æ¾ã¦C¨Ì§Ç¶ñ¤Jsheet2 C3,C4,C5...,¦p¹Ï³Ì·s¤@µ§¬°sheet2 C11,½Ð±Ð¦U¦ì¤j¤j§Ún¦p¦ó§ó§ïµ{¦¡Åý³Ì·s¤@µ§Åܰʪº¸ê®Æ¥Ã»·¦bsheet2ªºC3,³Ì·s²Ä¤Gµ§©¹¤U²¾¤@®æ¦bsheet2 C4,³Ì·s²Ä¤Tµ§¦bsheet2 C5...¨Ì¦¹Ãþ±À!·Ð½Ð¦U¦ì¤j¤j¨ó§U,ÁÂÁÂ!
1. Dim AR
2. Private Sub Worksheet_Calculate()
3. Dim i As Integer
4. i = 2
5. Do While i <= Cells(2, "C").End(xlDown).Row
6. If Not IsError(Cells(i, "C")) Then
7. If Cells(i, "C") > 100 Then
8. With Sheets("sheet2").[C65535].End(xlUp).Offset(1).Resize(, 3)
9. If IsEmpty(AR) Then
10. .Value = Cells(i, "A").Resize(, 3).Value
11. ElseIf Cells(i, "C") <> AR(i - 1, 1) Then
12. .Value = Cells(i, "A").Resize(, 3).Value
13. End If
14. End With
15. End If
16. End If
17. i = i + 1
18. Loop
19. AR = Range(Cells(2, "C"), Cells(2, "C").End(xlDown))
20. End Sub |