¦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
- 169
- ¥DÃD
- 39
- ºëµØ
- 0
- ¿n¤À
- 252
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2011-4-17
- ³Ì«áµn¿ý
- 2020-7-17
|
¦^´_ 13# yen956
ÁÂÁÂyen956¤j¤jªºÀ°¦£¡A¯uªº«Ü¦n¥Î¡A¤]ÁÂÁÂML089¤j¤j¡A·PÁÂ^^ |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 12# man65boy
¸Õ¸Õ¬Ý:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Lst As Integer, r As Integer, Rng As Range
Lst = [A65536].End(xlUp).Row '¨ú±o ÄæA ³Ì¤U±«DªÅ¥Õ®æªº¦C¸¹
Set Rng = [B2].Resize(Lst - 1, 4) '³]©wWorksheet_ChangeIJ°Ê½d³ò¬°[B2:Dxx], xx=Lst(¦C¸¹)
If Target.Count > 2 Then Exit Sub '¦pªG¤@¦¸§ïÅܦh®æ«h¨S§@¥Î
If Intersect(Target, Rng) Is Nothing Then Exit Sub '¦pªG§ïÅܪºÀx¦s®æ¤£¦b¹wp½d³ò¤º«h¨S§@¥Î
r = Target.Row
'¦pªG§ïÅܪºÀx¦s®æ¬O BÄæ ©Î CÄæ, «h
If Target.Column = 2 Or Target.Column = 3 Then
'¡¹¦pªG Target ¬°ªÅ¥Õ, «h
If Target = "" Then
Target.Offset(0, 2) = "" '²M°£¦P¦C¥kÃä¨âÄ檺Cell
Target.Offset(0, 2).Interior.ColorIndex = 35 '¨Ã¤Ï¥Õ
Target.Cells(r, 6) = "" '¨Ã²M°£¦P¦Cªº[Fxx]
'¡¹§_«h
Else
'¦pªG¦P¦C¥kÃä¨âÄ檺Cell¬°ªÅ¥Õ, «h¶ñ¤J²{¦b®É¶¡, ¤£¬OªÅ¥Õ, «h¤£¶ñ
If Target.Offset(0, 2) = "" Then
Target.Offset(0, 2) = Now '¶ñ¤J²{¦b®É¶¡
Target.Offset(0, 2).Interior.ColorIndex = xlNone '¥B¨ú®ø¤Ï¥Õ
End If
End If
End If
'¦pªG °_©l®É¶¡ ¤Î µ²§ô®É¶¡ ¤£¬OªÅ¥Õ, «h¦b [Fxx] pºâ®É®t(¥H¤ÀÄÁ¬°³æ¦ì)
If Application.Count(Cells(r, 4), Cells(r, 5)) = 2 Then
Cells(r, 6) = Int((Cells(r, 5) - Cells(r, 4)) * 24 * 60)
End If
End Sub |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 11# yen956
©ç¨Æ¡A¤p§Ì¨S¼g©ú¥Õ!
°²³]B5¿é¤J¤Hû«á¡AD5¶]¥X"°_©l®É¶¡"¡AC5¿é¤J¤Hû«á¡AE5¶]¥Xµ²§ô®É¶¡¡A¤§«áVBA»yªk¤w¸g§âF5°µ²Îp¤F¡A§Ú¦bÀH·N§ó§ï°_©l®É¶¡D5¡AF5ªº²Îp®É¶¡´N¤£·|¦A§ó§ï¤F¡A¬O³oÓ·N«ä¡C |
|
|
|
|
|
|
- ©«¤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
|
¦^´_ 7# man65boy
"¦ý¦pªG¤â°Ê§ó§ï®É¶¡ªº¸Ü¡A¦@p"¤À"¥i§_¦P®É§ó§ï¼Æ¾Ú"
¬Ý¤£À´§Aªº»Ý¨D¬O¤°»ò? |
|
|
|
|
|
|
- ©«¤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, ÁÂÁ |
|
|
|
|
|
|
- ©«¤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
- 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
- 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
- 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¤½¦¡
|
|
|
|
|