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

§Q¥ÎVBA±N·j´M¤º®eÅã¥Ü¥X¨Ó(¼Æµ§¸ê®Æ)

§Q¥ÎVBA±N·j´M¤º®eÅã¥Ü¥X¨Ó(¼Æµ§¸ê®Æ)




¤p§Ì·QÅý¦Û¤vªºEXCEL¬y¤ô±b¯à°÷¥i¥H¦Û¤v·j´M
¤£ª¾¹D­n«ç»ò°µ¤~¥i¥H§e²{¥X³o¼Ë?
¤p§Ì°ÝÃD¤w¥Î¹Ï¤ùªí¥Ü...
·Q­n¥ÎVBA¼g¥X¨Ó,¤£ª¾¹D¦³¨S¦³¤j®v¯à°÷ÂI¿U¨º»ò¤@¹D¥ú
¤@·ø©ú¿O...¬°¤p§Ì«ü¤Þ¤@ÂI¤è¦V..




§e²{µ²ªG¦p¹Ï...¸÷¨D¤j¯««üÂI...

TOP

¥»©«³Ì«á¥Ñ yen956 ©ó 2017-4-17 14:36 ½s¿è

¦^´_ 2# bioleon69
¸Õ¸Õ¬Ý:
  1. '·j´M
  2. Private Sub CommandButton1_Click()
  3.     Dim eR As Long, Dt As Date, Dt1 As Date, Dt2 As Date, St As String, Rng As Range, E
  4.     If [E2] = "" And [E4] = "" Then Exit Sub
  5.     [G2].Resize(Rows.Count - 1, 3) = ""
  6.     eR = [A65536].End(xlUp).Row
  7.     Set Rng = [A2].Resize(eR - 1, 1)
  8.     If [E2] <> "" Then
  9.         Dt1 = [E2] & "/1"
  10.         Dt2 = Year(Dt1) & "/" & Month(Dt1) + 1 & "/1"
  11.      End If
  12.     For Each E In Rng
  13.         Dt = E: St = E.Offset(, 1)
  14.         If [E2] = "" Then
  15.             If St = [E4] Then
  16.                 eR = [G65536].End(xlUp).Row + 1
  17.                 E.Resize(1, 3).Copy Cells(eR, 7)
  18.             End If
  19.         ElseIf [E4] = "" Then
  20.             If Dt >= Dt1 And Dt < Dt2 Then
  21.                 eR = [G65536].End(xlUp).Row + 1
  22.                 E.Resize(1, 3).Copy Cells(eR, 7)
  23.             End If
  24.         Else
  25.             If Dt >= Dt1 And Dt < Dt2 And St = [E4] Then
  26.                 eR = [G65536].End(xlUp).Row + 1
  27.                 E.Resize(1, 3).Copy Cells(eR, 7)
  28.             End If
  29.         End If
  30.     Next
  31. End Sub
  32. '²M°£
  33. Private Sub CommandButton2_Click()
  34.     [G2].Resize(Rows.Count - 1, 3) = ""
  35. End Sub
½Æ»s¥N½X

TOP

¨ç¼Æ °Ñ¦Ò
http://blog.xuite.net/hcm19522/twblog/500065104
google"EXCEL°g"  blog  ©Îgoogleºô§}:https://hcm19522.blogspot.com/

TOP

¤é´Á¬O¤°»ò®æ¦¡,
¤£¤W¶ÇÀÉ®×, Ãø¥H´£¨Ñ·N¨£??

FORMAT([a2], "E/MM") = 105/02

TOP

¦^´_ 3# yen956


ÁÂÁÂYEN¤j,¥i¥H¨Ï¥Î!
¤p§Ì»ÝªáÂI®É¶¡®ø¤Æ¤@¤U±zªºµ{¦¡½X!



ÁÂÁÂhcm¤j
¤]Åý§Ú«õ¨ì¤@­ÓEXCELºô¯¸!
·PÁ¤j¤j!

ÁÂÁ­㴣³¡ªLª©¥D¤j
¤é´Á®æ¦¡´N¬O105/02 6­Ó¦r¦ê
¨Sªþ¤W¬O¤p§Ì²¨©¿!!
¤p§Ì¥Ø«e¥ý¦æ¬ã¨s«e­±¨â¦ì¤j¤jªº¤èªk
¤§«á¦³°ÝÃD·|¦bµo°Ý!

«D±`·PÁ¤T¦ì¤j¤j¼ö¤ß¦^´_
¯¬¨­Åé°·±d,¨Æ¨Æ¶¶¤ß,°]·½ºuºu,§ë¸ê¾Þ§@¶¶§Q!

TOP

        ÀR«ä¦Û¦b : ¦a¤WºØ¤Fµæ¡A´N¤£©öªø¯ó¡F¤ß¤¤¦³µ½¡A´N¤£©ö¥Í´c¡C
ªð¦^¦Cªí ¤W¤@¥DÃD