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

Ãö©óuserformªº°ÝÃD

Ãö©óuserformªº°ÝÃD

¦U¦ì¤j¤j¡A¤p§Ì°µ¤F¤@­Óuserform¦pªþ¥ó¡A
¹J¨ìªº°ÝÃD¬O¦b¡yªÑ²¼¥N¸¹¡z³o­ÓÄæ¦ì¡A
¦pªG¬O¿ï¾Ü¦³¹ïÀ³¨ìªºªÑ²¼¥N¸¹¡A¤U­±¬ÛÃöªºÄæ¦ì´N·|±a¥X¤º®e¨Ó¡A
¦ý¬O¦pªG¬O¥Î¦Û¦æ¿é¤J¡A¥B²M³æ¸Ì¨S¦³¸Ó¥N¸¹¹ïÀ³ªº¸ê®Æ¡A
¤U­±ªºÄæ¦ì§Ú¸Ó«ç»ò³]©w¡A¤~¯àÅý¥L§â¨ä¥LÄæ¦ì¤º®e²MªÅ¡A
¦Ó¤£¬OÅã¥Ü³Ì±µªñªº¤º®e¡A³y¦¨¿ù»~¡C

¨Ò¦p§Ú¿é¤J2354(ÂE·Ç)¡A¦ý²M³æ¸Ì¨Ã¨S³oÀɪѲ¼ªº¸ê®Æ¡A
¤U­±ªºÄæ¦ìÀ³¸Ó­n³£§ì¤£¨ì¸ê®Æ¤~¹ï¡A
¥i¬O¤U­±©Ò¦³ªº¤º®e«o³£Åã¥Ü2355(·qÄP)ªº¬ÛÃö¸ê®Æ¡A
³o¼Ë²£¥X¨Óªº¸ê®Æ´N·|³y¦¨¿ù»~¤F¡C
·Ð½Ð¦U¦ì¤j¤jÀ°¦£¸Ñ´b¤@¤U¡AÁÂÁÂ~~~

ªÑªF·|test.rar (29.52 KB)

Application.VLookup(sel, Sheet1.[a3:s65536], 2, False)·|¶Ç¦^¿ù»~
¦ý¦]¬°On Error Resume Next ªºÃö«Y¡A©Ò¥Hµ{¦¡¤´·|°õ¦æ
©Ò¥H¦bµ{¦¡¤¤¼W¥[¤@­Ó§P§O¬O§_¦³¿ù(¦p¤U)
  1. Private Sub ComboBox1_Change()
  2. Dim sel As Long
  3. On Error Resume Next
  4. sel = ComboBox1.Text
  5. TextBox2 = Application.VLookup(sel, Sheet1.[a3:s65536], 2, False)
  6. TextBox6 = Application.VLookup(sel, Sheet1.[a3:s65536], 4, False)
  7. TextBox5 = Application.VLookup(sel, Sheet1.[a3:s65536], 9, False)
  8. TextBox3 = Application.VLookup(sel, Sheet1.[a3:s65536], 12, False)
  9. TextBox4 = Application.VLookup(sel, Sheet1.[a3:s65536], 13, False)
  10. If Err <> 0 Then
  11. TextBox2 = ""
  12. TextBox6 = ""
  13. TextBox5 = ""
  14. TextBox3 = ""
  15. TextBox4 = ""
  16. End If
  17. End Sub
½Æ»s¥N½X
°Ê©À¦¨¦]¿n¦]¦¨ªG by huijuang

TOP

¦^´_ 2# huijuang

¤Ó¦n¤F¡A¥i¥H¤F¡A·PÁ§A^^

TOP

¦^´_ 3# owen06
  1. Dim Rng As Range, Ar()
  2. Private Sub UserForm_Initialize()
  3.     Ar = Array(TextBox2, TextBox6, TextBox5, TextBox3, TextBox4) '±±¨î¶µ¸m©ó°}¦C
  4.     With Sheet1
  5.         Set Rng = .[A3]
  6.         ComboBox1.RowSource = .Range("a3:a" & [a65536].End(3).Row).Address
  7.         ComboBox2.RowSource = .[iv65533:iv65536].Address
  8.     End With
  9. End Sub
  10. Private Sub ComboBox1_Change()
  11.     Dim sel(), i As Integer
  12.     sel = Array(2, 4, 9, 12, 13)
  13.     With ComboBox1  '.ListIndex = -1 ¤£¦b²M³æ¤¤
  14.         For i = 0 To UBound(Ar)
  15.             Ar(i).Text = IIf(.ListIndex > -1, Rng.Offset(.ListIndex, sel(i) - 1), "")
  16.         Next
  17.     End With
  18.     'TextBox2 = Application.VLookup(sel, Sheet1.[a3:s65536], 2, False)
  19.     'TextBox6 = Application.VLookup(sel, Sheet1.[a3:s65536], 4, False)
  20.     'TextBox5 = Application.VLookup(sel, Sheet1.[a3:s65536], 9, False)
  21.     'TextBox3 = Application.VLookup(sel, Sheet1.[a3:s65536], 12, False)
  22.     'TextBox4 = Application.VLookup(sel, Sheet1.[a3:s65536], 13, False)
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# GBKEE

ÁÂÁª©¥D¤j¤jªº«ü¾É¡A¯à§_¦A¶¶«K½Ð±Ð¤@¤U¡A
§Ú©³¤U³o­ÓªþÀɸ̪ºµ{¦¡¡A¸Ó¦p¦óÅýd1ªº­ÈÅã¥Ü¬°#n/aªº®É­Ô¡A
Åýd1ªºÀx¦s®æ®æ¦¡Åܬ°;;;
¥Ø«e¥d¦b¤£ª¾¸Ó«ç»ò³]©wif [d1]= XXX

¥t¥~·Q½Ð°Ý=if(iserror(vlookup(c1,a1:b3,2,false)),"",(vlookup(c1,a1:b3,2,false))
³o­Ó¤½¦¡¦³¿ìªk¼g¦bvba¸Ì¶Ü¡H§Ú«ç»ò¼g³£µo¥Í¿ù»~¡K
·Ð½Ð©âªÅ´À¤p§Ì¸Ñµª¤@¤U¡AÁÂÁÂ

Book1.rar (6.56 KB)

TOP

¦^´_ 5# owen06
  1. If IsError([D1]) Then
  2.     '©Î¬O If [D1].Text = "#N/A" Then
  3.    
  4.     [D1] = "=IF(ISERROR(VLOOKUP(C1,A1:B3,2,FALSE)),"""",VLOOKUP(C1,A1:B3,2,FALSE))"
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 6# GBKEE


    ÁA¸Ñ¤F¡A¦A¦¸ÁÂÁª©¥D½ç±Ð~

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD