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

[µo°Ý] Àx¦s®æ¦Û°Êupdate

[µo°Ý] Àx¦s®æ¦Û°Êupdate

A

john&ABC01
john&ABC01

D7«Y¤H¤â¿é¤J,§Ú·Q°Ý°Ý,¦pªG§Ú¥ý¦bA1¿é¤JABC01¤§«á  Àx¦s®æ¦Û°ÊÅܦ¨  john&ABC01
À³¸Ó«ç¼Ë¼g?     
    Dim myRng(1 To 1003) As Range
    Dim i             As Long
    For j= 1 To 1003
        
Set john=D7
Set myRng(j) = Cells(j, 1)      
    Next
    Cells.Clear                                 
   myRng(1).Value = "john&ABC01"              
    myRng(2).Value = "john&ABC02""
           
End Sub

¦hÁÂ2¦ì¦Ñ®v

TOP

¦^´_ 12# john2006168
If Target <> "" Then Target = [D7] & Target
¥H¤Wµ{¦¡½X ¬õ¦â¤å¦r [Àx¦s®æ¤£¬°ªÅ¥Õ] ªº±ø¥ó¦¨¥ß®É °õ¦æ Target = [D7] & Target

TOP

¦^´_ 16# GBKEE

yes§R°£Àx¦s®æ,´N¤£¦æ



¦^´_ 15# Hsieh


    ¦]¬°¦³®É­Ô¥´¿ù,²MªÅÀx¦s®æ´N¤£¦æ¤F

TOP

    ¬O¥i¥H,¤£¹L¦pªG¦³delete´N¤£¦æ¤F.   ¬O§R°£Àx¦s®æ¶Ü? ¬O·|¦³°ÝÃD
john2006168 µoªí©ó 2010-6-5 23:03

¬OÀx¦s®æ="" ¶Ü?
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Target.Column <> 1 Then Exit Sub '¤£¬O¦bAÄæ¿é¤J´N°h¥X
  3. Application.EnableEvents = False 'Ãö³¬Ä²µo¨Æ¥óµ{§Ç
  4. If Target <> "" Then Target = [D7] & Target
  5. Application.EnableEvents = True '¶}±ÒIJµo¨Æ¥óµ{§Ç
  6. End Sub
½Æ»s¥N½X

TOP

¦^´_ 14# john2006168


    ¬O«ç¼Ë¤£¦æ?¬O¤£¯à²MªÅ¶Ü?
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Not Target.Address Like "$A$*" Or Target = "" Then Exit Sub '¤£¬O¦bAÄæ¿é¤J´N°h¥X
  3. Application.EnableEvents = False 'Ãö³¬Ä²µo¨Æ¥óµ{§Ç
  4.     Target = [D7] & Target
  5. Application.EnableEvents = True '¶}±ÒIJµo¨Æ¥óµ{§Ç
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

If Not Target.Address Like "$A$*" Then Exit Sub '¤£¬O¦bAÄæ¿é¤J´N°h¥X
Hsieh µoªí©ó 2010-6-5 09:01

¤@¼Ëªº®ÄªG  If Target.Column <> 1 Then Exit Sub '¤£¬O¦bAÄæ¿é¤J´N°h¥X

TOP

¦^´_ 10# Hsieh


    ·PÁ  Hsieh¤j¡A¨ü±Ð¤F¡C

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-6-5 14:15 ½s¿è

¦^´_ 9# victorl
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2. If Not Target.Address Like "$A$*" Then Exit Sub '¤£¬O¦bAÄæ¿é¤J´N°h¥X
  3. Application.EnableEvents = False 'Ãö³¬Ä²µo¨Æ¥óµ{§Ç
  4.     Target = [D7] & Target
  5. Application.EnableEvents = True '¶}±ÒIJµo¨Æ¥óµ{§Ç
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ victorl ©ó 2010-6-5 02:44 ½s¿è

¦^´_ 6# john2006168

°Ñ¦Ò¤@¤U
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address <> "$D$7" And InStr(Target.Value, Range("D7").Value) = 0 Then Target.Value = [D7] & Target.Value
End Sub
»¡©ú:
1. Target.Address <> "$D$7"      D7Àx¦s®æÅܧ󤣯àIJµoWorksheet_Change¨Æ¥ó
2. InStr(Target.Value, Range("D7").Value) = 0     ÁקK­«½ÆIJµoWorksheet_Change¨Æ¥ó
3. °£D7Àx¦s®æ¤§¥~¥u­n¤º®eÅܧ󧡷|¨Ì  ¼Ó¥Dªº»Ý¨DÅܧ󤺮e

TOP

        ÀR«ä¦Û¦b : ¨Ã«D¦³¿ú¾{¬O§Ö¼Ö¡A°Ý¤ßµL·\¤ß³Ì¦w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD