- ©«¤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-4-10 16:24 ½s¿è
¦^´_ 98# ÂŤÑÄR¦À
ªÑ²¼10A.rar (22.07 KB)
ªÑ²¼10B.rar (23.52 KB)
- Sub RecordPrice(TG As Range)
- Dim WR As Long, cts As Long
-
- With Sheets("RTD")
- If .Range("A1") < 1 Then Exit Sub
-
- cts = TG.Column
-
- WR = .Cells(Rows.Count, cts).End(xlUp).Row + 1 ' ¨D¨ú¸Ó²§°ÊÄæ¦ìªº³Ì«á¤@µ§¬ö¿ý¦C¦ì¸m
-
- If WR = 3 Or .Cells(WR - 1, cts) <> .Cells(2, cts) Then
- .Cells(WR, cts).Offset(, -3).NumberFormatLocal = "hh:mm:ss" ' ³]©wÀx¦s®æ®æ¦¡ (®É¶¡)
-
- ' ×¥¿¬°¥u¼g¤J ¡y¨é°Ó¦W¡z¡B¡y¦¨¥æ¡z¡B¡yÁ`¶q¡z¡A¡u®É¶¡¡v«h¤£¤©¦P¨B±a¤J
- ' .Cells(WR, cts).Offset(, -2).Resize(, 3) = .Range(TG.Address).Offset(, -2).Resize(, 3).Value
- .Cells(WR, cts).Offset(, -2).Resize(, 4) = .Range(TG.Address).Offset(, -2).Resize(, 4).Value
- End If
- End With
- End Sub
½Æ»s¥N½X- Private Sub Worksheet_Calculate()
- Dim Rng As Range, E As Variant
-
- ' Sheets("RTD") ¤u§@ªí¤W¥ô¦ó¦³¤½¦¡Àx¦s®æȦ³ÅÜ°Ê,±Ò°Ê Sheets("RTD") ªº Worksheet_Calculate ¨Æ¥ó
- On Error Resume Next ' Àɮ׶}±Ò®É DEE¶Ç¦^¿ù»~È
- Set Rng = UsedRange.Cells.SpecialCells(xlCellTypeFormulas, xlErrors)
-
- If Not Rng Is Nothing Then Exit Sub
- On Error GoTo 0 ' ¶}½L¤£¦A³B²zµ{¦¡½Xªº¿ù»~
-
- For Each E In Me.Names
- If E.Name Like "*TotalVolume*" Then ' Á`¶qªº¦WºÙ
- If Range(E.Name) > 0 Then ' Á`¶q > 0
- With Cells(Rows.Count, Range(E.Name).Column).End(xlUp)
- ' Á`¶q¦WºÙ©Ò¦bªº³Ì©³¦C©¹¤W¨ì¦³¸ê®ÆªºÀx¦s®æ
- If .Row = 2 Or .Row > 2 And .Value <> Range(E.Name).Value Then ' (¦UªÑÁ`¶q¦³ÅÜ°Ê)
- ' ×¥¿¬°¥u¼g¤J ¡y¨é°Ó¦W¡z¡B¡y¦¨¥æ¡z¡B¡yÁ`¶q¡z¡A¡u®É¶¡¡v«h¤£¤©¦P¨B±a¤J
- ' .Offset(1).Cells(1, -1).Resize(, 3) = Range(E.Name).Cells(, -1).Resize(, 3).Value
- .Offset(1).Cells(1, -1).Resize(, 4) = Range(E.Name).Cells(, -1).Resize(, 4).Value
- End If
- End With
- End If
- End If
- Next
- End Sub
½Æ»s¥N½X ¥]§t¡u®É¶¡¡v¤F¡C |
|