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

VBA¨Ï¥ÎVLOOKUP¥\¯à

VBA¨Ï¥ÎVLOOKUP¥\¯à

§Ú·Q¥ÑVBAªº¤U©Ô¦¡²M³æ¿ï¨ú¤§«á¥i¦bLABELÅã¥Ü¥XEXCEL¤ºªºDATA¤£ª¾¸Ó¦p¦ó¼g¡A½Ð¦U¦ì°ª¤â«ü¾É

ª½±µ¥ÎVLOOKUP
Application.WorksheetFunction.VLookup("X", Range("A1:B3"), 2, False)
¦pªí¦bA1:B3
ÄæA ÄæB
Z    1
X    2
Y    3
¤W­±ªº·|¦^¶Ç2
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

§Ú¸òµo¤åªº¤j¤j¦³¤@¼Ëªº°ÝÃD~~~
¤U­±¬O§Ú¼gªº¨ç¼Æ~~~~
¥i¬O«öÁä°õ¦æ«á¡A´N¥X²{"µLªk¨ú±oÃþ§OWorksheetFunction ªºVLookup ÄÝ©Ê"
½Ð°Ý¬O­þ¸Ì¥X¤F°ÝÃD~~~~
½Ð¤j¤j«ü±Ð

Private Sub CommandButton5_Click()

myForm.Label13.Caption = Application.WorksheetFunction.VLookup(myForm.ComboBox1.Text, ¤u§@ªí1.Range("A:E"), 2, False)

End Sub

TOP

¦^´_ 3# hray1234


   §A·Ó§Ú³o¼Ë¥h§ï§ï¬Ý¡A¥i¯à¬O¬°textboxªº¤º®e¬°string¡A¦Ó¤u§@ªíªº¼Æ¾Ú¬°double¡A©Ò¥H¤ñ¹ï¤£¥X¨ÓªºÃö«Y¡C
  1. Private Sub CommandButton1_Click()
  2. ans = UserForm1.ComboBox1.Value * 1
  3. UserForm1.Label1.Caption = _
  4. Application.VLookup(ans, ¤u§@ªí1.Range("A:E"), 2, False)
  5. End Sub
½Æ»s¥N½X

TOP

·PÁÂOVEN¤j¤j~~~
¨º¥i¥H¦A½Ð±Ð¤@­Ó°ÝÃD¶Ü¡H
¦³¿ìªkÅýExcel¸ÌSheet¤º¤U©Ô¦¡¿ï³æ~~~~~
ÀHµÛMyFormªºLabel1.Caption¨ÓÅܰʶܡH

TOP

¦^´_ 5# hray1234

¤°»ò¼Ëªº¤U©Ô¦¡¿ï³æ¡H¤è«K§Ë­Ó²©öªºªþÀɨӬݬݶܡH

TOP

¥»©«³Ì«á¥Ñ hray1234 ©ó 2015-1-28 10:37 ½s¿è


´N¬O­Y§ÚÂI¿ïMyForm¤WªºLabel
§Ú¸Ì­±²{¦bªº¨ç¼Æ¬O³o¼Ë
¤£ª¾¹D§Ú¤U©Ô¦¡¿ï³æ¬O§_¥i¥H¹ïÀ³¨ì§Ú¼ÐÅÒ¤W­±ªº¤º®e~~~~

Private Sub Label13_Click()
Sheets("Adhesion Recipe").Select
Unload Me
End Sub

TOP

¥»©«³Ì«á¥Ñ owen06 ©ó 2015-1-30 00:10 ½s¿è

¦^´_ 7# hray1234


    comboboxªº¤º®e·|µ¥©ólabelªº¼gªk¡A¦ýlabelªº¤º®e¡A¦ü¥G¤£·|²Å¦X§A­nªº²M³æ¦Cªk­C
    ¥i¥H·Ð½Ð§¹¾ãªº¸Ô­z§A·Q­nªº§@ªk¶Ü¡H
  1. Private Sub Label1_Click()
  2. List = Array(UserForm1.Label1.Caption)
  3. Sheet1.ComboBox1.List = List
  4. End Sub
½Æ»s¥N½X

TOP

Oven¤j~~~~~
¸Ô²Ó»¡©ú¦p¤U
Step1.
´N¬O±NLabel1ªº¤º®eµ¥©óComboBox1ªº¤º®e(¤w¸Ñ¨M)
Step2.
ÂI¿ïLabel1«á¡A·|¦Û°Ê¸õ¨ìsheet1
µM«ásheet1¸Ì­±ªº¤U©Ô¦¡¤è¶ô·|¹ïÀ³¨ìLabel1ªº¤º®e
¦Ó«ü©wÀx¦s®æªº¤º®e´N·|ÀHµÛ¤U©Ô¦¡ªº¤è¶ôªº¤º®e¦ÓÅÜ°Ê

³o´N¬O§Ú·Q­nªº§@ªk~~~
§Ú¸Õ¹LOven¤j¤W­±ªº¼gªk~~~~
¦ý¬OSheet1¤º§ä¤£¨ìComboboxªº¿ï¶µ~~~
­Y¯à§ä¨ì¤U©Ô¦¡¤è¶ôªº¨ç¼Æ~~~~
§Ú·QÀ³¸Ó°ÝÃD´N¥i¥H¸Ñ¨M¤F~~~
ÁÂÁÂ

TOP

¦^´_ 9# hray1234

  ³o¼Ë¥i¥H¶Ü¡H
  1. Private Sub Label1_Click()
  2. List = Array(UserForm1.Label1.Caption)
  3. Sheet1.ComboBox1.List = List
  4. Sheet1.Select
  5. Unload Me
  6. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD