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

[µo°Ý] ¦p¦ó±N¤½¦¡§ï¦¨­È

[µo°Ý] ¦p¦ó±N¤½¦¡§ï¦¨­È

Sub RecordPrice()
Dim WR As Long
Dim I As Byte

If IsError(Range("B2")) Or IsError(Range("C2")) Then Exit Sub


WR = Range("A1").End(xlDown).Row + 1
'ActiveWindow.ScrollRow = WR - 5 '¥uÅã¥Ü³Ì·s´Xµ§¸ê®Æ
If (WR = 3) Or _
   (Range("D" & WR - 1) <> Range("D2")) Then 'Á`¶q¦³²§°Ê®É¤~°O¿ý
   'For I = 1 To 13
      'Cells(WR, I) = Cells(2, I)
   'Next 'I
   Cells(WR, 1).Resize(, 4) = [A2:D2].Value
   Cells(WR, "E").Formula = "=RC[-3]-R[-1]C[-3]"
   Cells(WR, "F").Formula = "=RC[-3]-R[-1]C[-3]"
   
  
End If

'For I = 1 To 9
'   Cells(WR, I) = Cells(2, I)
'Next 'I
End Sub

½Ð°Ýª©¤W«e½ú¡A§Ú¦pªG­n±N¤W­zµ{¦¡¤¤Cells(WR, "E").Formula = "=RC[-3]-R[-1]C[-3]"¸ò   Cells(WR, "F").Formula = "=RC[-3]-R[-1]C[-3]"¡A¦b°õ¦æ§¹¤½¦¡«á¦bÀx¦s®æ¤W­±¥uÅã¥Ü­È¡A¦Ó¤£¬O¤½¦¡¡A­n¦p¦ó­×§ï©O?

¤j¤j, ³o¨â¦æ§ï¦¨¦p¤U, ½Ð±z¬Ý¦X¤£¦X¥Î?

   With Cells(WR, "E")
   .Value = .Offset(0, -3) - .Offset(-1, -3)
   End With
   With Cells(WR, "F")
   .Value = .Offset(0, -3) - .Offset(-1, -3)
   End With

TOP

¦^´_ 2# blacklmj


    ·PÁ«e½ú¦^´_

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD