- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 21# RCRG
·PÁÂÁ¦A¤T´ú¸Õ,³y¦¨¤£«K, ÁٽХ]²[!!
³oÓª©¥», ¿é¥X¦ì¸m¬G·N»Pã¤j¿ù¶}, ¤è«K§A¤ñ¹ï.
¸Õ¸Õ¬Ý:- '´¡¤J§Ç¸¹, ¥H«K«ì´_쪬
- Sub ´¡¤J§Ç¸¹(LstR As Integer)
- Dim I As Integer
- For I = 2 To LstR
- Cells(I, 10) = I
- Next
- End Sub
- Sub test()
- Dim LstR As Integer, LstR2 As Integer, sR As Integer, I As Integer, cnt As Integer
- Dim maxDate As Date
- Sheets("ÄY«¿ù»~").Select
- [H2:J65536] = ""
- [H:J].Interior.ColorIndex = xlNone '²M°£©³¦â
- LstR2 = Cells(Rows.Count, 3).End(xlUp).Row
- ´¡¤J§Ç¸¹ LstR:=LstR2 '´¡¤J§Ç¸¹, ¥H«K«ì´_쪬
- [A1].Resize(LstR2, 10).Sort _
- Key1:=[C1], Order1:=xlAscending, _
- Key2:=[G1], Order1:=xlAscending, _
- Header:=xlYes
- LstR = Cells(Rows.Count, 3).End(xlUp).Row
- sR = 2
- Do
- cnt = sR
- Do
- '³W«h2.¸¹½X¬Û¦P, ¥B»s³y¤é¦³±Æ§Ç, «h¨ì´Á¤é¤]¥²¶·±Æ§Ç
- If Cells(sR, 3) = Cells(sR + 1, 3) And Cells(sR, 5) > Cells(sR + 1, 5) Then
- Cells(sR, 9) = "²§±`2a"
- Cells(sR, 9).Interior.ColorIndex = 38
- End If
- '³W«h1.¸¹½X¬Û¦P, ¥B»s³y¤é¬Û¦P, ¦ý¨ì´Á¤é¤£¦P
- If Cells(sR, 3) = Cells(sR + 1, 3) And Int(Cells(sR, 7)) = Int(Cells(sR + 1, 7)) And Cells(sR, 5) <> Cells(sR + 1, 5) Then
- Cells(sR, 8) = "²§±`1"
- Cells(sR, 8).Interior.ColorIndex = 8
- Cells(sR + 1, 8) = "²§±`1"
- Cells(sR + 1, 8).Interior.ColorIndex = 8
- End If
- sR = sR + 1
- Loop Until Cells(sR, 3) <> Cells(sR + 1, 3) Or sR >= LstR 'ª½¨ì ¸¹½X¤£¦P ©Î ¸ê®Æµ²§À
- For I = cnt To sR
- maxDate = Application.Max(Cells(I, 5).Resize(sR - 1, 1))
- '³W«h2.¸¹½X¬Û¦P, ¥B»s³y¤é¦³±Æ§Ç, «h¨ì´Á¤é¤]¥²¶·±Æ§Ç
- If Cells(I, 3) = Cells(I + 1, 3) And Cells(I, 5) > maxDate Then
- Cells(I, 9) = "²§±`2b"
- Cells(I, 9).Interior.ColorIndex = 38
- End If
- Next
- Loop Until sR >= LstR 'ª½¨ì¸ê®Æµ²§À
- '«ì´_쪬
- [A1].Resize(LstR2, 10).Sort _
- Key1:=[J1], Order1:=xlAscending, _
- Header:=xlYes
- End Sub
½Æ»s¥N½X |
|