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

°õ¦ævba¥X²{À³¥Îµ{¦¡©w¸q¿ù»~

®É¶¡¬Û´î~¸ê®Æ«¬ºA¤£²Å

½Ð°Ý¤U­z¤G­Ó®É¶¡¥Îvba¬Û´î¨Ã´«ºâ¦¨¬í¼Æ¡A¦ý¤@ª½¥X²{¸ê®Æ«¬ºA¤£²Å¡A½Ð°Ý¬O­n­×§ï­þ¡H
§Ç¸¹         00:00:02        00:04:00

Sub test2()
Application.ScreenUpdating = False

Dim rng(1), E As Range
Set rng(1) = Sheets("sheets1").Range("A1", Range("A" & Rows.Count).End(xlUp))
For Each E In rng(1)
E.Offset(, 3) =( E.Offset(, 2)-E.Offset(, 2))*86400

Next
·s¤H¤@ªT

TOP

¦^´_ 1# eric093

E.Offset(, 3) =( E.Offset(, 2)-E.Offset(, 2))*86400
À³¸Ó¬Oµ§»~
§ï¬°
E.Offset(, 3) =( E.Offset(, 2)-E.Offset(, 1))*86400
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

°õ¦ævba¥X²{À³¥Îµ{¦¡©w¸q¿ù»~

½Ð°Ý¤U­±°õ¦æ®É¡A®É¥i¥¿±`°õ¦æ¡A¦ý¦³®É¥X²{À³¥Îµ{¦¡©w¸q¿ù»~¡A
­YSheets("¶K³o")§R°£¾ã­ÓÄæ¦C¤u§@­¶°õ¦æ®É¤S¥i¥H¡A¤£ª¾°ÝÃD¦b­þ


sub test ()
Application. screenupdate=false
Dim rng(1),M as Range
Sheets("¶K³o").Range(h:h).Clear
Set rng(1)=Sheets("¶K³o"). Range("A2",Range("A"&Rows.count).End(xlUp))
For Each M In rng(1)
M.Offset(,7)=(M.Offset(,3)-M.Offset(,2))*86400
If M.Offset(,7)<0 Then
   M.Offset(,7)==""
End If
Next
End sub
·s¤H¤@ªT

¦^´_ 1# eric093


Sheets("¶K³o").Range(h:h).Clear  




Sheets("¶K³o").Range("h:h").Clear

  1. 'Set rng(1) = Sheets("¶K³o").Range("A2", Range("A" & Rows.Count).End(xlUp))
  2. 'µ{¦¡½X¦b "¶K³o"¤u§@ªí¼Ò²Õ¤W¥i¦æ
  3. '¦p¤£¦b"¶K³o"¤u§@ªí¼Ò²Õ¤W,¥B ActiveSheet ¤£¬O"¶K³o"¤u§@ªí ,·|¥X¿ù
  4. '¤£¦b"¶K³o"¤u§@ªí¼Ò²Õ¤W«Øij­×§ï
  5. With Sheets("¶K³o")
  6.     .Range("h:h").Clear
  7.     Set rng(1) = .Range("A2", .Range("A" & .Rows.Count).End(xlUp))
  8. End With
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

·PÁª©¤j¬Û±Ï¡I
¦ý¬O¥X²{³B²z³t·¥½wºC¡I
­ì¥»Àɮפ¤´N¤w¦³§Oªº¥¨¶°¡A¦Ó§Ú¦b³oÀɮפ¤·s¼W¤@­Ó¼Ò²Õ¡A³æ¿W°õ¦æ®É¨ä³t«×Àt³tªººC¶]¤£¤F¡I
¦ý¥H¬Û¦Pªº¸ê®Æ¶K¦b·s¼Wªº¬¡­¶Ã¯¤U°õ¦æ®É¡A¤@¬í§Y¥i¥H§¹¦¨¡I
ps¡G¥Ñ©ó­ìÀɮצ³¤j¶qªº«È¤á¸ê®Æ¤Î­û¤u¸ê®Æ(µLªk±N¸ê®Æ¥Î¨ä¥¦¥N¸¹´À¥N¡A¦]¬°¸ê®Æ¨CÄæ¸ê®Æ³£¬O«È¤á¤Î­û¤u¸ê®Æ)¡A©Ò¥H¤£¤è«K¤W¶Ç¡A½Ð¨£½Ì¡I
·s¤H¤@ªT

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-15 05:36 ½s¿è

¦^´_ 5# eric093


   
¦Ó§Ú¦b³oÀɮפ¤·s¼W¤@­Ó¼Ò²Õ¡A³æ¿W°õ¦æ®É¨ä³t«×Àt³tªººC¶]¤£¤F

¸Õ¸Õ¬Ý
  1. Option Explicit
  2. Sub test()
  3.     Dim Rng As Range
  4.     'Application.screenupdate = False 'screenupdate ????
  5.     Application.ScreenUpdating = False
  6.     With Sheets("¶K³o")
  7.         .Range("h:h").Clear
  8.         'Set rng(1) = .Range("A2", .Range("A" & .Rows.Count).End(xlUp))
  9.         Set Rng = .Range("A2", .Range("A" & .Rows.Count).End(xlUp)).Offset(, 7)
  10.         With Rng
  11.             .Formula = "=if((d2-c2) * 86400>0,(d2-c2) * 86400,0)" 'µ¹¤½¦¡
  12.             .Value = .Value    '±N½d³òªº¤½¦¡Âର­È
  13.         End With
  14.     End With
  15.     Application.ScreenUpdating = True
  16. End Sub
½Æ»s¥N½X
ps¡G¥Ñ©ó­ìÀɮצ³¤j¶qªº«È¤á¸ê®Æ¤Î­û¤u¸ê®Æ(µLªk±N¸ê®Æ¥Î¨ä¥¦¥N¸¹´À¥N¡A¦]¬°¸ê®Æ¨CÄæ¸ê®Æ³£¬O«È¤á¤Î­û¤u¸ê®Æ)¡A©Ò¥H¤£¤è«K¤W¶Ç¡A½Ð¨£½Ì¡I

ºûÅ@­Ó¸ê(¤½¥qªº¾÷±K)¥i­×§ï¸ê®Æ,¤W¶Ç­×§ïªº³¡¥÷§Y¥i
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ÁÂÁ¦U¦ìª©¥D¡A­ì¨Ó¥i¥H´«­Ó¤è¦¡·Q¡I¡I°ÝÃD±Æ°£¤F¡I
·s¤H¤@ªT

TOP

        ÀR«ä¦Û¦b : ¹D¼w¬O´£ª@¦Û§Úªº©ú¿O¡A¤£¸Ó¬O¨þ¥¸§O¤HªºÃ@¤l¡C
ªð¦^¦Cªí ¤W¤@¥DÃD