ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] Àu¤Æ¥¨¤jªºVBA

¥IÀɬ°§Úªº½d¨ÒÀÉ¡K¡K
¦bE3©ME4¿é¤J¤½¦¡¡A¥Î¡u¶i¶¥¿z¿ï¡v¡K¡K¸Ô¨£VBE

½d¨Ò.rar (477.47 KB)

ªì¾ÇVBA¥E¨ìtwbts

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-21 17:04 ½s¿è

¦^´_ 11# play9091
¨S°ÝÃD, ³o¼Ë¶i¶¥¿z¿ï¹ïªü.
¤u§@ªí¨ç¼Æ ISLOGICAL °Ñ·Óªº­È¬OÅÞ¿è­È ¶Ç¦^ TRUE    ,E4 ¶Ç¦^ ¬°TRUE ©ÎFALSE ¦P¼Ë¬OÅÞ¿è­È,
=IF(ISLOGICAL(E4)," & "" & ",A10)"    ¥Ã»·¶Ç¦^ ""     ³o¤½¦¡¬O»~¥´»~¼²ªº
  1. Sub ttt()
  2.     Sheets("Sheet1").Range("E3") = ""   
  3.    '©Î Sheets("Sheet1").Range("E3") = "ABC"
  4.   ' ¶i¶¥¿z¿ï :    ¿z¿ï·Ç«h ¬O­pºâ¬O·Ç«h(±ø¥ó¸Ì¦³­pºâ¤½¦¡)  , ·Ç«hÄæ¦ì: ¤£¥i¬O¸ê®Æ®w¤ºªºÄæ¦ì (¥i¥H¬OªÅ¥ÕÄæ¦ì)
  5.     '­pºâ¬O·Ç«h    ¦pE4=  A10   ¬O¿z¿ï¤£¨ì¸ê®Æ
  6.     Sheets("Sheet1").Range("E4").Value = "=AND(TEXT(RIGHT(A11, 8), ""hh:mm:ss"") >= ""02:00:00"",TEXT(RIGHT(A11, 8), ""hh:mm:ss"") <= ""21:30:00"")"
  7.     Range("A10").CurrentRegion.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
  8.         Range("E3:E4"), Unique:=False
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 12# GBKEE

¤W¶Ç¿ù½d¨Ò¤F¡K¡K¨º­Ó½d¨ÒÀɬO¥i¥H¦¨¥\¿z¿ïªº¡K¡K
¤W¶Ç¥t¥~¤@­ÓÀÉ¡A¦P¼Ëªº±¡ªp¡A°µ¦P¼Ëªº¿z¿ï¡A¦ý¬O½T¿z¿ï¤£¥X¨Ó¡K¡K§Úªº°ÝÃD¬O³o­Ó¡Kª©¥DÀ³¸Ó·|²M·¡§Úªº°ÝÃD

½d¨Ò¤G.rar (773.22 KB)

ªì¾ÇVBA¥E¨ìtwbts

TOP

¦^´_ 13# play9091
¥i¥H§r,µ{¦¡½X¸ò¤W¤@ÀÉ®×®t¤£¦h,§ä¤£¨ì¿ù»~.
  1. Sub ttt()
  2.     Sheets("Sheet1").Range("E3").Value = ""
  3.     Sheets("Sheet1").Range("E4").Value = "=AND(TEXT(RIGHT(A11, 8), ""hh:mm:ss"") >= ""02:00:00"",TEXT(RIGHT(A11, 8), ""hh:mm:ss"") <= ""21:30:00"")"
  4.    ' Range("A11").Select
  5.    ' Range(Selection, Selection.End(xlToRight)).Select
  6.    ' Range(Selection, Selection.End(xlDown)).Select
  7.     Range("A10:EQ5482").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:= _
  8.         Range("E3:E4"), Unique:=False
  9. End Sub
½Æ»s¥N½X

TOP

¦^´_ 14# GBKEE

·PÁª©¤j­@¤ßªº¦^µª§Úªº¨C¤@­ÓÄê°ÝÃD¡K¡KÃö©ó¶i¶¥¿z¿ïªº°ÝÃD¡A§Ú§ä¨ì¿ù»~ªº¦a¤è¤F¡A´N¬O§Ú¿ï¾Ü³Q¿z¿ïªº¦a¤è¿ïªº¤£°÷¤j¡K¡K©Ò¥H¦³¨Çªº¸ê®Æ¨S¦³³Q¿z¿ï¨ì¡C
©ú¤Ñ§Ú¤S­n¶}©l§Úªº¥t¥~¤@¥÷VBA®Èµ{¡AÁٽХý¶i­Ì¦h¦h«ü±Ð¡K¡K
§Ú¤]·|«ùÄòªº¥´ÂZ¦U¦ìªº¡I¡I¡I
ªì¾ÇVBA¥E¨ìtwbts

TOP

        ÀR«ä¦Û¦b : ÁÀ¨¥¹³¤@¦·²±¶}ªºÂAªá¡A¥~ªí¬üÄR¡A¥Í©Rµu¼È¡C
ªð¦^¦Cªí ¤W¤@¥DÃD