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

vba ¦Û°Ê®É¶¡update§ì¨úµ{¦¡

vba ¦Û°Ê®É¶¡update§ì¨úµ{¦¡

½Ð°Ý¦U¦ì
°²³]§Ú¦³¤@¦C¸ê®Æ¡A¥t¤@Ãä¬OÅã¥Ü¸ê®Æ(«O¯d3µ§),¥i¥H³]©w®É¶¡¨ì¡A´N¦Û°Ê®ø¥¢¡A«á­±¦Û°Ê»¼¸É(Ãþ¦ü¤õ¨®®É¨èµe­±)

time.rar (1.97 KB)

11

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-28 16:52 ½s¿è

¦^´_ 1# tonycho33
¤u§@ªí Sheet1ªºµ{¦¡½X
  1. Option Explicit
  2. Sub Ex()
  3.     Dim E As Range, AR(), i As Integer, N As Variant
  4.     ReDim AR(1, 0)
  5.     For Each E In [C6:C14]
  6.        If [H6] + (1 / 24 * E) > Now Then
  7.             AR(0, UBound(AR, 2)) = E.Offset(, -1)
  8.             AR(1, UBound(AR, 2)) = CDbl([H6] + 1 / 24 * E)
  9.             ReDim Preserve AR(1, UBound(AR, 2) + 1)
  10.        End If
  11.     Next
  12.     [G7].Resize(3, 2) = ""
  13.     If UBound(AR, 2) = 0 Then
  14.         Exit Sub
  15.     Else
  16.         ReDim Preserve AR(1, UBound(AR, 2) - 1)
  17.     End If
  18.     For i = IIf(UBound(AR, 2) >= 1, IIf(UBound(AR, 2) = 1, 1, 2), 0) To 0 Step -1
  19.         N = Application.Small(Application.Index(AR, 2), i + 1)
  20.         N = Application.Match(N, Application.Index(AR, 2), 0) - 1
  21.         [G7].Cells(i + 1, 1) = AR(0, N)
  22.         [G7].Cells(i + 1, 2) = AR(1, N)
  23.     Next
  24.     Application.OnTime Time + #12:01:00 AM#, "SHEET1.Ex"   '1¤ÀÄÁ°õ¦æ¤@¦¸
  25. End Sub
½Æ»s¥N½X

TOP

§A¦n
°õ¦æ§¹«á¥X²{
{§ä¤£¨ì ¥¨¶° Sheet1.Ex}
¥t¥~½Ð°Ý¬O§_¥i«ö·ÓBÄ涶§Ç¤U¨Ó©O
ÁÂÁÂ

TOP

¦^´_ 3# tonycho33
³o¬O¤u§@ªí Sheet1ªºµ{¦¡½X

°Ý¬O§_¥i«ö·ÓBÄ涶§Ç¤U¨Ó©O:
For Each E In [C6:C14]     ->   For Each E In Range("B1", Range("B1").End(xlDown))

TOP

§A¦n Åã¥Ü°ÝÃD
«¬ºA¤£²Å¦X (¿ù»~ 13)
ÁÂÁÂ

TOP

¦^´_ 5# tonycho33
«¬ºA¤£²Å¦X (¿ù»~ 13)  ³o¬O¨º¤@¦æªº¿ù»~ ½ÐªþÀɤ~¬Ýªº¨ì.
¦p¬OBÄæ »Ý¥þ³¡¬O¼Æ¦r

TOP

For Each E In Range("B1", Range("B1").End(xlDown))

TOP

¦^´_ 7# tonycho33

time.rar (7.98 KB)

TOP

¦^´_ 8# tonycho33

¹w©w®É¶¡³o¸Ì,­n¿é¤J¤é´Á®É¶¡ ,
ªþÀɵ{¦¡½X ­n«ö·ÓBÄ涶§Ç¤U¨Ó
»Ý­×§ï¬°   For Each E In Range("C6", Range("C6").End(xlDown))

TOP

¦^´_ 9# GBKEE


    §A¦n
·Ó³o¼Ë¿é¤J«á¡A¦n¹³¬O«ö·ÓCÄæ®É¶¡³Ìµuªº¥ý±Æ¡A¥i¥H«ö·ÓBÄæAA¡BBB¡BCC¡BDD¡BEE....ªº¶¶§Ç¤U¨Ó¶Ü
ÁÂÁÂ

TOP

        ÀR«ä¦Û¦b : ¤H­n¦Û·R¡A¤~¯à·R´¶¤Ñ¤Uªº¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD