[¨D§U] ±N°}¦C¸ê®Æ¿z¿ï, «ö±ø¥ó¤À¦C
- ©«¤l
- 33
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 62
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-17
- ³Ì«áµn¿ý
- 2020-11-2
|
[¨D§U] ±N°}¦C¸ê®Æ¿z¿ï, «ö±ø¥ó¤À¦C
¥»©«³Ì«á¥Ñ sammyc ©ó 2011-12-1 16:29 ½s¿è
¦³¤@°}¦C, ¤º¦³¤u¸¹,¤é´Á¤Î®É¶¡, ¦p¦ó±N¨ä«ö¤u¸¹,¤Î¤é´Á ¦A«ö®É¬q±N¼Æ¾Ú¤À¦C±Æ¥X ? |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 1# sammyc
³Ì«áªº®É¶¡°Ï¬q ¤Ö¤@Ó0 214500-223000
- Option Explicit
- Sub Ex()
- Dim Ar(1 To 6), i, ii, F As Boolean
- For i = 1 To 6
- Ar(i) = Split(Range("G3").Cells(1, i), "-") 'Ū¨ú®É¶¡°Ï¬q
- Next
- With Range("E2")
- i = 2
- .CurrentRegion.Offset(2).Clear
- Do While Cells(i, "C") <> "" 'Ū¨ú¸ê®Æ
- .Offset(i) = Cells(i, "C")
- .Offset(i, 1) = Cells(i, "A")
- F = True '¤ñ¸û«eªºÅܼÆ=True
- For ii = 1 To 6 '¦b6¬q®É¶¡¸Ì¤ñ¸û«á¨ú±o®É¶¡°Ï¬q
- If Val(Cells(i, "B")) >= Val(Ar(ii)(0)) And Val(Cells(i, "B")) <= Val(Ar(ii)(1)) Then
- .Offset(i, ii + 1) = Cells(i, "B")
- F = False '¦³¨ú±o®É¶¡°Ï¬qªºÅܼÆ=False
- Exit For
- End If
- Next
- If F = True Then .Offset(i, ii + 1) = Cells(i, "B")
- i = i + 1
- Loop
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 33
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 62
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-17
- ³Ì«áµn¿ý
- 2020-11-2
|
¥ýÁÂÁ¤j¤jªº±Ð¾É, ¦ý°õ¦æ«á, ¦P¤@¤é´Á·|¥X²{¦h¦æ |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 3# sammyc
©êºp¦³ÂI²´ªá¨S¬Ý²M·¡ÃD·N
§ó¥¿:- Option Explicit
- Sub Ex()
- Dim Ar(), TimeAr(1 To 6), i As Long, ii As Long, R As Integer, F As Boolean
- Ar = Range("A1").CurrentRegion '³Æ¥÷¸ê®Æ
- Range("A1").CurrentRegion.Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("A2"), Order1:=xlAscending, Header:=xlYes '±Æ§Ç¸ê®Æ
- For i = 1 To 6
- TimeAr(i) = Split(Range("G3").Cells(1, i), "-") 'Ū¨ú®É¶¡°Ï¬q¥[¤J¬°TimeAr°}¦Cªº¤¸¯À
- Next
- With Range("E2")
- i = 2 'Ū¨ú¸ê®Æ¦C
- R = 2 '¼g¤J gx,dateªº¸ê®Æ¦C
- .CurrentRegion.Offset(2).Clear '²M°£ ¼g¤J°Ï
- Do
- Do
- .Offset(R) = Cells(i, "C") '¼g¤J gx
- .Offset(R, 1) = Cells(i, "A") '¼g¤J date
- F = True '¤ñ¸û«eªºÅܼÆ=True
- For ii = 1 To 6 '¦b6¬q®É¶¡¸Ì¤ñ¸û«á¨ú±o®É¶¡°Ï¬q
- If Val(Cells(i, "B")) >= Val(TimeAr(ii)(0)) And Val(Cells(i, "B")) <= Val(TimeAr(ii)(1)) Then
- .Offset(R, ii + 1) = Cells(i, "B") '¼Æȼg¤J®É¶¡°Ï¬q
- F = False '¦³¨ú±o®É¶¡°Ï¬qªºÅܼÆ=False
- Exit For 'Â÷¶}°j°é
- End If
- Next
- If F = True Then .Offset(R, ii + 1) = Cells(i, "B")
- If Cells(i, "A") <> Cells(i + 1, "A") Then R = R + 1 '¤£¦Pdate©¹¤U¤@¦æ
- i = i + 1
- Loop Until Cells(i, "C") <> Cells(i + 1, "C") Or Cells(i + 1, "C") = "" '¨Ì§ÇŪ¨ú¸ê®Æª½¨ì gx ¤£¬Û¦P,©Î¸ê®Æ¬°ªÅ¥Õ
- Loop Until Cells(i, "C") = "" '¨Ì§ÇŪ¨ú¸ê®Æ°j°éª½¨ì¸ê®Æ¬°ªÅ¥Õ
- End With
- Range("A1").CurrentRegion = Ar 'ÁÙì¸ê®Æ
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 33
- ¥DÃD
- 9
- ºëµØ
- 0
- ¿n¤À
- 62
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-17
- ³Ì«áµn¿ý
- 2020-11-2
|
¦^´_ 4# GBKEE
ÁÂÁÂ, ¤v¥i¨M°ÝÃD, |
|
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X
|
|
|
|
|