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

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

¥»©«³Ì«á¥Ñ 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

¥»©«³Ì«á¥Ñ ÂŤÑÄ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

¦^´_ 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

¦^´_ 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

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

TOP

¥»©«³Ì«á¥Ñ ÂŤÑÄ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

¦^´_ 16# ÂŤÑÄR¦À
¨º[A] ®É¶¡°Z¤£³Q«áªÌ¼Å»\¡H

TOP

¦^´_ 16# ÂŤÑÄR¦À
Like this?

TOP

¦^´_ 17# c_c_lai
ªÑ²¼-1.rar (18.51 KB)

§Ú¬O¥´ºâ¤§«á¦h¤@Äæ¨Ó¼g¤J®É¶¡¡AÅý¨C­Ó®É¶¡³£¤À¶}¡AC¤j«ç»ò¬Ý??

TOP

¦^´_ 18# c_c_lai


    ¹ï

TOP

        ÀR«ä¦Û¦b : ­n¤ñ½Ö§ó¨ü½Ö¡D¤£­n¤ñ½Ö§ó©È½Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD