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

[µo°Ý] ®É¶¡©M®É¶¡ªº­pºâ

[µo°Ý] ®É¶¡©M®É¶¡ªº­pºâ

½Ð°Ý¦U¦ì¤j¤j«e½ú­Ì¡G
°ÝÃD¤@¡G¨D¸Ñ¦p¦ó±o¥XF2¡BF3¡BF4µ¥µ¥ªº­È¡A¦p¦ó¤U¨ç¼Æ©Î¤½¦¡¡C
°ÝÃD¤G¡GE2=DATEDIF(C2,D2,"D")©MF2ªº¤½¦¡¦p¦ó¸g¥ÑVBA¤è¦¡¤@µ§¤@µ§ªº¼g¤J©O¡H¤£·Q¥ÎÀx¦s®æ½Æ»s³o­Ó¤èªk¡A¦]¬°¸ê®Æ·|¤@ª½¼W¥[¡C
date and time.rar (7.89 KB)

¦^´_ 1# sammay
  1. Sub ex()
  2. For Each a In [C2:C4]
  3.   a.Offset(, 2) = DateDiff("D", a, a.Offset(, 1))
  4.   a.Offset(, 3) = Format(a.Offset(, 1) - a - DateDiff("D", a, a.Offset(, 1)), "h:mm:ss")
  5. Next
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh
·PÁÂHsieh¤j¤jªº¹©¤O¬Û§U

TOP

¦A½ÐHsieh¤j¤j
µ{¦¡½X¤¤¡AFor Each a In [C2:C4] ¨ä¤¤ªºC4¦p¦ó³]¦¨ÅܼƩO¡H

TOP

¦^´_ 2# Hsieh
¦A½ÐHsieh¤j¤j
µ{¦¡½X¤¤¡AFor Each a In [C2:C4] ¨ä¤¤ªºC4¦p¦ó³]¦¨ÅܼƩO¡H

TOP

¦^´_ 4# sammay

­nªá¤@ÂI®É¶¡~ ¤F¸Ñ~ °ò¥»Àx¦s®æªº¥Îªk~
´N¥i¥H¦Û¦æ­×§ï~ ¥[ªo~
  1. Sub ex()
  2. A = Range("C65536").End(xlUp).Row '¥HCÄæ¦ì¨Ó½T©w¸ê®Æ³Ì«á¤@µ§
  3. For Each A In Range("C2:C" & A)   'A¬O¤@­ÓÅܰʪº¦ì¸m
  4.   A.Offset(, 2) = DateDiff("D", A, A.Offset(, 1))
  5.   A.Offset(, 3) = Format(A.Offset(, 1) - A - DateDiff("D", A, A.Offset(, 1)), "h:mm:ss")
  6. Next
  7. End Sub
½Æ»s¥N½X
¾Ç²ß¤~¯à´£¤É¦Û¤v

TOP

¦^´_ 6# hugh0620
·PÁÂhugh0620«e½úªº¹©¤O¬Û§U¡A·P®¦¡I

TOP

        ÀR«ä¦Û¦b : §g¤l¦p¤ô¡AÀH¤è´N¶ê¡AµL³B¤£¦Û¦b¡C
ªð¦^¦Cªí ¤W¤@¥DÃD