¦p¦ó§Q¥ÎVBAIJµoÀx¦s®æ²£¥Í¤é´Á.®É¶¡
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦p¦ó§Q¥ÎVBAIJµoÀx¦s®æ²£¥Í¤é´Á.®É¶¡
½Ð±Ð¦Ñ®v̦p¦ó¦b¤u§@ªíIJµoÀx¦s®æ«á¡A¹ïÀ³ªºÄæ¦ì²£¥Í¤é´Á.®É¶¡
1.BÄæ¿é¤J¤å¦r«á¡A¢ìÄæ¹ïÀ³Äæ¦ì´NÅã²{¤é´Á.®É¶¡¡ABÄæ¨S¿é¤J¡A
DÄæ¹ïÀ³Äæ¦ì´N¤Ï¥Õ¡C
2.CÄæ¿é¤J¤å¦r«á¡AEÄæ¹ïÀ³Äæ¦ì´NÅã²{¤é´Á.®É¶¡¡ACÄæ¨S¿é¤J¡A
EÄæ¹ïÀ³Äæ¦ì´N¤Ï¥Õ¡C
3.FÄ欰¦Xppºâ®É¶¡Äæ¦ì¡C
ÁÂÁ¦ѮvÌÀ°¦£¡I
ªþÀÉ:
20160108.rar (16.42 KB)
|
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim r%, xD As Range, xE As Range, xF As Range
- With Target
- If .Count > 1 Then Exit Sub
- If Intersect(Union([B:B], [C:C]), .Cells) Is Nothing Then Exit Sub
- Application.EnableEvents = False
- .Offset(0, 2).Value = Now()
- r = .Row() - 1: Set xD = [D1].Offset(r, 0): Set xE = [E1].Offset(r, 0): Set xF = [F1].Offset(r, 0)
- If Application.Count(xD, xE) = 2 Then xF = Int((xE - xD) * 24 * 60)
- Application.EnableEvents = True
- End With
- End Sub
½Æ»s¥N½X |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦^´_ 2# ML089
¯u¦hÁÂML089¦Ñ®vªº¦^µª¡A¦pªG¿é¤J¤é´Á.®É¶¡«á¡A§Ú¦b¤â°Ê§ó§ï°_©l®É¶¡©Îµ²§ô®É¶¡¡A¥i§_Åý²Îpªº"¤À"¡A¤]¦P®É¦P¨BÅܧó¥[Á`¡A³Â·Ð¦Ñ®v¤F^^ |
|
|
|
|
|
|
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 2# ML089
·PÁ ML089¶Wª©ªºVBAªº |
|
|
|
|
|
|
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¥»©«³Ì«á¥Ñ yen956 ©ó 2016-1-8 15:55 ½s¿è
¸Õ¸Õ¬Ý!!- Private Sub Worksheet_Change(ByVal Target As Range)
- Dim Lst As Integer, r As Integer
- Lst = [A65536].End(xlUp).Row
- If Target.Count > 2 Then Exit Sub '¦pªG¤@¦¸§ïÅܦh®æ«h¨S§@¥Î
- r = Target.Row
- If r > Lst Then Exit Sub '¦pªG³Ì¤U±ªº³¡ªù¬°ªÅ¥Õ«h¨S§@¥Î
-
- '¦pªG§ïÅܪºÀx¦s®æ¤£¦b BÄæ ©Î CÄæ «h¨S§@¥Î
- If Target.Column <> 2 And Target.Column <> 3 Then Exit Sub
-
- '¦pªG Target ¬°ªÅ¥Õ, «h¹j¨âÄæ¤Ï¥Õ, ¨Ã²M°£[Fxx]
- If Target = "" Then
- Target.Offset(0, 2) = ""
- Target.Offset(0, 2).Interior.ColorIndex = 35
- Cells(r, 6) = ""
- Else
- Target.Offset(0, 2) = Now '§_«h¹j¨âÄæ¨ú®ø¤Ï¥Õ, ¶ñ¤J²{¦b®É¶¡
- Target.Offset(0, 2).Interior.ColorIndex = xlNone
- End If
-
- '¦pªG [Dxx] ¤Î [Exx] ¤£¬OªÅ¥Õ, ¦b [Fxx] pºâ®É®t(¥H¤ÀÄÁ¬°³æ¦ì)
- If Cells(r, 4) <> "" And Cells(r, 5) <> "" Then
- Cells(r, 6) = Int((Cells(r, 5) - Cells(r, 4)) * 24 * 60)
- End If
- End Sub
½Æ»s¥N½X
|
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
¥»©«³Ì«á¥Ñ ML089 ©ó 2016-1-9 07:38 ½s¿è
¦^´_ 3# man65boy
FÄ檽±µ¥Î¤½¦¡±a¤J
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count > 1 Then Exit Sub
If Intersect(Union([B:B], [C:C]), .Cells) Is Nothing Then Exit Sub
Application.EnableEvents = False
.Offset(0, 2).Value = Now()
Range("F" & .Row) = "=IF(COUNT(RC4:RC5)=2,INT((RC5-RC4)*24*60),"""")"
Application.EnableEvents = True
End With
End Sub
¸É¥R¡G
³o¬O ¬Û¹ï¦ì¸m¤½¦¡
Range("F" & .Row) = "=IF(COUNT(RC[-2]:RC[-1])=2,INT((RC[-1]-RC[-2])*24*60),"""")"
³o¬O µ´¹ï¦ì¸m¤½¦¡
Range("F" & .Row) = "=IF(COUNT(RC4:RC5)=2,INT((RC5-RC4)*24*60),"""")" |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦^´_ 5# yen956
ÁÂÁÂyen956¤j¤jªº¦^µª¡A¦ý¦pªG¤â°Ê§ó§ï®É¶¡ªº¸Ü¡A¦@p"¤À"¥i§_¦P®É§ó§ï¼Æ¾Ú¡AÁÂÁ§A! |
|
|
|
|
|
|
- ©«¤l
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦^´_ 6# ML089
ÁÂÁÂML089¤j¤jªº¦^µª¡Aµ¹¤p§Ì¦h¤F¤@¶µ¸ÑÃDªºµª®×!¯u·PÁÂ^^ |
|
|
|
|
|
|
- ©«¤l
- 2025
- ¥DÃD
- 13
- ºëµØ
- 0
- ¿n¤À
- 2053
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- Office2007
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_¥«
- µù¥U®É¶¡
- 2011-3-2
- ³Ì«áµn¿ý
- 2024-3-14
|
¦^´_ 8# man65boy
³o¬O ¬Û¹ï¦ì¸m¤½¦¡
Range("F" & .Row) = "=IF(COUNT(RC[-2]:RC[-1])=2,INT((RC[-1]-RC[-2])*24*60),"""")"
³o¬O µ´¹ï¦ì¸m¤½¦¡
Range("F" & .Row) = "=IF(COUNT(RC4:RC5)=2,INT((RC5-RC4)*24*60),"""")" |
|
{...} ªí¥Ü»Ýn¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡
|
|
|
|
|
- ©«¤l
- 522
- ¥DÃD
- 36
- ºëµØ
- 1
- ¿n¤À
- 603
- ÂI¦W
- 0
- §@·~¨t²Î
- win xp sp3
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-12-13
- ³Ì«áµn¿ý
- 2021-7-11
|
¦^´_ 6# ML089
ÁÂÁ¤j¤jªº«ü¾É!!
¤×¨ä¬O¥Î
Range("F" & .Row) = "=IF(COUNT(RC4:RC5)=2,INT((RC5-RC4)*24*60),"""")"
ªº¨Ï¥Î, ¥i¥H²¤Æ¤£¤Ö If A and B then ... ªº¼gªk, «D±`¹ê¥Î, ¦¬¤U, ÁÂÁ |
|
|
|
|
|
|