- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-3-22 13:17 ½s¿è
¦^´_ 8# ÂŤÑÄR¦À
Sheets - shtRTD (RTD)
쥻¤º®e¡G- Option Explicit
- Private Sub Worksheet_Calculate()
- Call RecordPrice
- End Sub
½Æ»s¥N½X ±N¥¦²¾°£±¼¡Aקאּ¡G- Option Explicit
- Private Sub Worksheet_Change(ByVal Target As Range)
- ' ·í B2 Äæ¦ì¦³²§°Ê®É¡A «h¥h©I¥s RecordPrice ªº¤èªk (Method)¡C
- If Target.Address = "$B$2" Then Call RecordPrice
- End Sub
½Æ»s¥N½X °²³]¡G
¦p§A±ý±N쥻¤§ ¡G- A B C D
- ®É¶¡ Á`¶q
- 22:38:54 8734.54 2238 8734.54
½Æ»s¥N½X §ó§ï¬°±q D Äæ¶}©l«·s§G§½¦¨¡G- C D E F
- ®É¶¡ Á`¶q
- 22:38:54 8734.54 2238 8734.54
½Æ»s¥N½X «h±N¤Wz¤§ Worksheet_Change ½Ð×¥¿¬°¡G- Private Sub Worksheet_Change(ByVal Target As Range)
- ' ·í D2 Äæ¦ì¦³²§°Ê®É¡A «h¥h©I¥s RecordPrice ªº¤èªk (Method)¡C
- If Target.Address = "$D$2" Then Call RecordPrice
- End Sub
½Æ»s¥N½X ¥t¥~¡A Module1 ¤º¤§ RecordPrice ¸Ìªº¼Ò²Õ¡G- Option Explicit
- Sub RecordPrice()
- Dim WR As Long
- If Range("D2") < 1 Then Exit Sub
- 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¿ý
- Cells(WR, 1).Resize(, 3) = [A2:C2].Value
- End If
- End Sub
½Æ»s¥N½X §ó´«¬°¡G- Option Explicit
- Sub RecordPrice()
- Dim WR As Long
- If Range("F2") < 1 Then Exit Sub
- WR = Range("C1").End(xlDown).Row + 1
- ' ActiveWindow.ScrollRow = WR - 5 ' ¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
- If (WR = 3) Or _
- (Range("D" & WR - 1) <> Range("D2")) Then ' Á`¶q¦³²§°Ê®É¤~°O¿ý
- Cells(WR, 3).Resize(, 3) = [C2:E2].Value
- End If
- End Sub
½Æ»s¥N½X |
|