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

[µo°Ý] ½Ð°Ý¦p¦ó±NÅܰʪº¼Æ­È¦b¥t¤@­¶¬ö¿ý?(½ÐÀ°¦£­×§ï¡AÁÂÁÂ)

[µo°Ý] ½Ð°Ý¦p¦ó±NÅܰʪº¼Æ­È¦b¥t¤@­¶¬ö¿ý?(½ÐÀ°¦£­×§ï¡AÁÂÁÂ)

§Ú·Q¦bMonitor­¶ªº²Ä¤G¦C¼Æ­È§ïÅܮɡA¦bHistory­¶¶K¤W¡A¨Ã¥B¤@ª½©¹¤U¬ö¿ý¡A¦p¦P¨é°Ó³nÅ骺¤À®É©ú²Ó

¦pªG§Ú¦bMonitor­¶¸ÌªºA2¥´123¡AµM«á¦A§ï¦¨456¡A
«h¦bHistory­¶¸Ì¥X²{ 456
                                          123
½Ð°Ý³o¤@¬q­n«ç»ò§ï
123.rar (11.07 KB)

Private Sub Worksheet_Change(ByVal Target As Range)
    ThisWorkbook.Sheets("History").Rows("2:2").Insert Shift:=xlDown
    Sheets("Monitor").Rows("2:2").Copy
    Sheets("History").Rows("2:2").PasteSpecial PasteValues
    Application.CutCopyMode = False
End Sub

¦^´_ 1# Brandy
¤u§@ªí1¼Ò²Õªºµ{¦¡½X  :»Ý±N³oµ{¦¡½X½Æ»s¨ì¤u§@ªí1(Monitor)¼Ò²Õ¤¤
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     Dim A As Integer
  3.     If Target.Address(0, 0) = "A2" Then
  4.         With Sheets("History")
  5.             '*** «h¦bHistory­¶¸Ì¥X²{ 456***
  6.             '¦p: ±q¤£§t.[B2] ¶}©l
  7.             A = .Cells(.Rows.Count, "B").End(xlUp).Row
  8.             A = IIf(A <= 2, 3, A + 1)
  9.              .Cells(A, "B") = Target
  10.         End With
  11.     End If
  12. End Sub
½Æ»s¥N½X

TOP

¦^´_ 1# Brandy
³o¦æ¿ù¤F
Sheets("History").Rows("2:2").PasteSpecial PasteValues
À³¬O
Sheets("History").Rows("2:2").PasteSpecial xlPasteValues

©Î§ï¦¨³o¼Ë
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.     If Target.Address(0, 0) = "A2" Then     '§PÂ_·íA2¦³ÅÜ°Ê®É
  3.         Sheets("Monitor").Rows("2:2").Copy
  4.         Sheets("History").Rows("2:2").Insert Shift:=xlDown
  5.         Application.CutCopyMode = False
  6.     End If
  7. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


    ÁÂÁ±zªº¦^ÂСA½Ð°Ý¦pªG¬O¾ã¦C¤§¤¤¥u­n¦³¤@®æ¦³Åܤƭn«ç»ò§ï©O?
   ÁÙ¦³§Ú¦bÀx¦s®æ¶K¤W¨é°Óªºrtd¦p¤U
=RTD("money.excel",,"*SYSTEM","ServerTime")
§Úª¾¹DÀx¦s®æ¨SÅܤơA©Ò¥H¤£·|¦³®ÄªG
¨º«ç»òÅý¥¦¤]¯à¤@¼Ë½Æ»s¶K¤W¦b·sªº¤@¦C
ÁÂÁÂ

TOP

¦^´_ 4# Brandy
  1. If Target.Row = 2 Then  '­×§ï¬Ý¬Ý
½Æ»s¥N½X

TOP

¦^´_ 3# stillfish00


    ÁÂÁ±zªº¦^ÂСA½Ð°Ý¦pªG¬O²Ä¤G¦C©Î¬O²Ä¤T¦Cªº¥ô¦ó¤@­ÓÀx¦s®æ¦³Åܤƪº¸Ü¡A­n«ç»ò§ï¡AÁÂÁÂ

TOP

¦^´_ 6# Brandy
§Ú¬O¤£¾å±o¨é°ÓRTD¬O«ç»ò¤u§@ªº
¥»¨Ó·Q¦^µª:
If Target.Row = 2 Or Target.Row = 3 Then
¦ý¬O¨ä¹ê³oÁÙ­n¬Ý§AÅܰʪºÀx¦s®æ¬O«ç»òµ¹­Èªº , ¥H¤Î§AIJµoªº»Ý¨D
¦p [A1:C2] ¤@­Ó¤@­ÓCellµ¹­È¸ò½d³òµ¹­È(¦p[A1:C2]=Array(1, 2, 3, 4, 5, 6)) ,
¥¦Ä²µoWorksheet_Changeªº¦¸¼Æ¤£¤@¼Ë ,
·íµMTarget¤]¤£¤@¼Ë (¥i¯à³æ®æ©Î¦h®æ)
¤ñ¸û«O¦uªº¤èªk¬O§Q¥ÎIntersect§PÂ_¤ñ¸û¤£·|º|±¼ , ¦p:
If Not Application.Intersect(Range("2:3"), Target) Is Nothing Then
¦ýÁÙ¬O¦Ñ¸Ü , ­n¬Ý¹ê»Ú¨Ï¥Î®ÉªºÄ²µo»Ý¨D

TOP

        ÀR«ä¦Û¦b : ¥Í®ð¡A´N¬O®³§O¤Hªº¹L¿ù¨ÓÃg»@¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD