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

»ù®æ¬ö¿ýªº»yªk¦³¼g¿ù¶Ü??

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-4-8 10:15 ½s¿è

¦^´_ 15# c_c_lai


    C¤j¡A¨S¿ù¡A¦ý¬O¥i¥HÅý¤¤¶¡ªºªÅ®æ¤£¨£¡A¤]´N¬O»¡¸ê®Æ¬O³sÄòªº¡A¥H¥x¿n¹q¨Ó»¡¤W¹Ï¥Ü¥X²{¦bB10-C11¡AÅý¸ê®Æ³sÄò¡A¥X²{¦bB8-C9¡A³o¼Ë¥i¥H¶Ü??

TOP

¦^´_ 14# ÂŤÑÄR¦À
¬O³o¼Ë¶Ü¡H

TOP

¦^´_ 13# c_c_lai

C¤j¡A¦]¬°¨C¤äªÑ²¼ªº¦¨¥æ®É¶¡¤£¤Ó¤@¼Ë¡A©Ò¥H­n¤À¶}¼g¤J¡A¤£µM­pºâ¤W·|¦³­«Å|

°²³]¥x¿n¹q9:01¤À¦³¦¨¥æ¡A¨ä¥L¨S¦¨¥æ¡A¦pªG¥þ³¡©¹¤U¼g¤J¡A¨ä¥Lªº¨S¦¨¥æ¤]·|¼g¤J¡A³o¼Ë³y¦¨¨C¤äªÑ²¼ªº¦¨¥æ¶q¦b­pºâ¤W·|­«½Æ¡A¦Ó¥B¦pªG¤À¶}¼g¤J¸ê®Æ¶q¤]¤¬¤ñ¸û¤Ö¤£¬O¶Ü??

TOP

¦^´_ 12# ÂŤÑÄR¦À
¤£¤Ó©úÁA "¦pªGC2ÅÜ°Ê´N©¹¤U¬ö¿ýB2-C2¡A¦ý¬O¨ä¥L¤£¬ö¿ý"¡A¬O¬Æ»ò·N«ä¡H
§Aªº RecordPrice() ¤@¦¸«K¼g¤J A:U °Ú¡C¦ó¿× "¨ä¥L¤£¬ö¿ý" ¡H

TOP

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-4-7 22:50 ½s¿è

¦^´_ 11# c_c_lai

ªÑ²¼.rar (18.4 KB)

C¤j¦A½Ð±Ð§A¤@¤U¡A§Ú¤§«eªºµ{¦¡½X¬O³]©w¬°¬Y¤@­Ó­ÈÅÜ°Ê´N¬ö¿ý¡A¨º·Q½Ð±Ð¤@¤UC¤j¦pªG§ÚªºÅÜ°Ê­ÈÅܦh­Óªº¤Æµ{¦¡½X­n¦p¦ó§ó§ï??

¨Ò:¦p¹Ï©Ò¥Ü¡A¦pªGC2ÅÜ°Ê´N©¹¤U¬ö¿ýB2-C2¡A¦ý¬O¨ä¥L¤£¬ö¿ý¡A¤U­Ó®É¶¡C2¨SÅÜ°Ê´«E2ÅÜ°Ê¡A«h°O¿ýD2-E2¡A¤@¼Ë¨ä¥L¤£¬ö¿ý¡A¥H¦¹Ãþ±À¡A§ÚªºÅܰʭȭ쥻¥u¦³³]©wIf (WR = 3) Or _  (Range("C" & WR - 1) <> Range("C2")) Then 'Á`¶q¦³²§°Ê®É¤~°O¿ý¡A§Ú²{¦b­n³]©w¦h­Ó¡A©Ò¦³¶qªº³¡¤À³£³]©w¬°ÅÜ°Ê´N¬ö¿ý¡A­n¦p¦ó§ó§ïµ{¦¡½X©O??

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-3-22 13:17 ½s¿è

¦^´_ 8# ÂŤÑÄR¦À
Sheets  -  shtRTD (RTD)
­ì¥»¤º®e¡G
  1. Option Explicit

  2. Private Sub Worksheet_Calculate()
  3.     Call RecordPrice
  4. End Sub
½Æ»s¥N½X
±N¥¦²¾°£±¼¡A­×§ï¬°¡G
  1. Option Explicit

  2. Private Sub Worksheet_Change(ByVal Target As Range)
  3.     '  ·í B2 Äæ¦ì¦³²§°Ê®É¡A «h¥h©I¥s RecordPrice ªº¤èªk (Method)¡C
  4.     If Target.Address = "$B$2" Then Call RecordPrice
  5. End Sub
½Æ»s¥N½X
°²³]¡G
¦p§A±ý±N­ì¥»¤§ ¡G
  1.   A                  B            C                 D
  2. ®É¶¡                Á`¶q               
  3. 22:38:54        8734.54        2238        8734.54
½Æ»s¥N½X
§ó§ï¬°±q D Äæ¶}©l­«·s§G§½¦¨¡G
  1.   C                 D             E                 F
  2. ®É¶¡                Á`¶q               
  3. 22:38:54        8734.54        2238        8734.54
½Æ»s¥N½X
«h±N¤W­z¤§ Worksheet_Change ½Ð­×¥¿¬°¡G
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     '  ·í D2 Äæ¦ì¦³²§°Ê®É¡A «h¥h©I¥s RecordPrice ªº¤èªk (Method)¡C
  3.     If Target.Address = "$D$2" Then Call RecordPrice
  4. End Sub
½Æ»s¥N½X
¥t¥~¡A Module1 ¤º¤§ RecordPrice ¸Ìªº¼Ò²Õ¡G
  1. Option Explicit

  2. Sub RecordPrice()
  3.     Dim WR As Long

  4.     If Range("D2") < 1 Then Exit Sub

  5.     WR = Range("A1").End(xlDown).Row + 1
  6.     '  ActiveWindow.ScrollRow = WR - 5           '  ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
  7.     If (WR = 3) Or _
  8.        (Range("B" & WR - 1) <> Range("B2")) Then '  Á`¶q¦³²§°Ê®É¤~°O¿ý
  9.         Cells(WR, 1).Resize(, 3) = [A2:C2].Value
  10.     End If
  11. End Sub
½Æ»s¥N½X
§ó´«¬°¡G
  1. Option Explicit

  2. Sub RecordPrice()
  3.     Dim WR As Long

  4.     If Range("F2") < 1 Then Exit Sub

  5.     WR = Range("C1").End(xlDown).Row + 1
  6.     '  ActiveWindow.ScrollRow = WR - 5           '  ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
  7.     If (WR = 3) Or _
  8.        (Range("D" & WR - 1) <> Range("D2")) Then '  Á`¶q¦³²§°Ê®É¤~°O¿ý
  9.         Cells(WR, 3).Resize(, 3) = [C2:E2].Value
  10.     End If
  11. End Sub
½Æ»s¥N½X

TOP

¦^´_ 9# c_c_lai


    C¤j§Ú·|¿ù·N¤F¡A­è­è¨S¬Ý¨ì§A«e­±¦³ '¡A§âµ{¦¡mark±¼©Ò¥H§Ú¤~ı±o©_©Ç¡A¬Ý¨ì«á´N¨S°ÝÃD¤F

TOP

¦^´_ 8# ÂŤÑÄR¦À
¥ý¦^µª§A²Ä¤@­Ó°ÝÃD¡G
  1. If (WR = 3) Or _
  2.     (Range("B" & WR - 1) <> Range("B2")) Then ' Á`¶q¦³²§°Ê®É¤~°O¿ý
  3.      For I = 1 To 3
  4.          Cells(WR, I) = Cells(2, I)
  5.      Next
  6. End If
½Æ»s¥N½X
±q For ~ Next §ï¬°¤U¦C¤@¦¸¥\¤Ò´N¶ñ¤J­È (Assign Value) ªº¤è¦¡¡A
§A»¡¬O­þ­Ó³B²z¸û§Ö³t¡H
  1. If (WR = 3) Or _
  2.     (Range("B" & WR - 1) <> Range("B2")) Then ' Á`¶q¦³²§°Ê®É¤~°O¿ý
  3.     Cells(WR, 1).Resize(, 3) = [A2:C2].Value
  4. End If
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ ÂŤÑÄR¦À ©ó 2016-3-22 08:32 ½s¿è

¦^´_ 7# c_c_lai


  1.  C¤j§Ú¤£¤ÓÀ´¡A¬°¤°»ò¦h¤FCells(WR, 1).Resize(, 3) = [A2:C2].Value³o¤@¦æµ{¦¡½X°õ¦æ¼Æ«×·|¥[§Ö??

2.¥t¥~¦A½Ð±Ð§A¤@­Ó°ÝÃD¡A¦pªG¥Ø«e¬O±NA2-C2ªº¸ê®Æ©¹¤U¼g¡A§ï¦¨§â¸ê®Æ©ñ¦bC2-E2µM«á©¹¤U¼g­n«ç»ò§ïµ{¦¡½X??
´N¬O±N¹Ï¤@§ï¦¨¹Ï¤G¡A¤W¹Ï¤£¬O§ï¦nªº¡A¬O§Ú¥Î©Ôªº

3.¥H¤U¬OJ¤j¼gªº¡A½Ð±ÐC¤j¥ÎExcel.Application.EnableEvents ¸ò§Aªº¥Îchange­þºØ¤ñ¸û§Ö??
Excel.Application.EnableEvents = 0
WR = Range("A1").End(xlDown).Row + 1
'ActiveWindow.ScrollRow = WR - 5 '¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
   (Range("B" & WR - 1) <> Range("B2")) Then 'Á`¶q¦³²§°Ê®É¤~°O¿ý
    For I = 1 To 3
    Cells(WR, I) = Cells(2, I)
    Next
End If
Excel.Application.EnableEvents = 1

TOP

¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-3-22 06:53 ½s¿è

¦^´_ 6# ÂŤÑÄR¦À
¨ú¥N§A­ì¥ý Sheets("RTD") ¸Ìªº Worksheet_Calculate()¡C
¤S¡A§A ¥Ø«e "¼Ò²Õ1" RecordPrice ¸Ìªº For ~ Next ¹Bºâ¦¡¥i¥H
¥Î¤U¦C¤è¦¡¨ú¥N¡A¥H¸`¬Ù³B¸Ì®É¶¡¡G
  1.    '  For I = 1 To 3
  2.    '      Cells(WR, I) = Cells(2, I)
  3.    '  Next I
  4.    Cells(WR, 1).Resize(, 3) = [A2:C2].Value
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD