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

[µo°Ý] ¦³ÃöExcel VBA°}¦C¨Ï¥Î¤è¦¡...

[µo°Ý] ¦³ÃöExcel VBA°}¦C¨Ï¥Î¤è¦¡...

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-7-31 23:53 ½s¿è

Excel VBAªº°ÝÃD
½Ð°Ý¦pªG§Ú¦³­Ó¤@ºû°}¦C
¸Ì­±¦³10­Ó¼Æ¦r¤À§O¹ïÀ³°}¦C(1~10)
°²³]§Ú¤µ¤Ñ­n±Æ§Ç°}¦C¤¤¼Æ­È¤j¨ì¤p
¨º§Ú­n¦p¦óª¾¹D±Æ¦W«e5¤j¼Æ­Èªº­ì©l¼ÐÅÒ(´N¬O­ì¥»ªº1~10±Æ§Ç³Q¥´¶Ã«á ¦p¦ó©I¥s)?
·PÁ¦^µª
  1. option explicit
  2. dim total(50) as variant

  3. for i = 1 to 50
  4. total(i) = application.worksheetfunction.sum(range(cells(i,1),cells(i,10)))
  5. next

  6. sorting....%#$?!
  7. index of top 20?!
½Æ»s¥N½X
©Î¬O¦³¨ä¥L§ó¦nªº¤è¦¡?!

¦^´_ 12# ­ã´£³¡ªL

¬O¬O! §ÚºCºC²Ö¿nµZ¿i«á¦A¨Ó¦V±z½Ð±Ð¡A·PÁ±zOvO

TOP

¦^´_ 11# VBALearner


   
µ{¦¡¤èªk¤Ö¤H¥Î, ¤@©w¦³¥¦ªº¹D²z,
·L³n·|´£¨Ñ¤£¦P¤èªk¥h³B²zÃþ¦ü»Ý¨D, ¤]¦³¥¦ªº¹D²z,
©Ò¥H, ¨S¦³¦n¤£¦n¥Î°ÝÃD, ¥u¦³¾A¤£¾A¥Î?
VBA¾a¸gÅç, ºCºCºN, ºCºC¿i, ªáªº®É¶¡°÷¦h, ¹ï¤_¸ê®Æªº³B²z, ¨ä¹ê´N¨º´X­Ó¤èªk§a!

TOP

¦^´_ 9# ­ã´£³¡ªL

«x...³o»ò¬Ý¨Ó...Evaluate¨ä¹ê«Ü¦n¥ÎÕÙ?!!
application.worksheetfunction³£§K¥s¤F
¥­±`¥Î²ßºDªº¤u§@ªí¨ç¼Æ³£ª½±µ¥ÎEvaluate©I¥s¤]¦æ¡A¬O§a?!(¤£¬ì¾ÇªüxD~~~)
¥i¬O¦n¹³¨S¦³«Ü¦h¤H¦b¥ÎEvaluate¡A¥«­±¤Wªº®Ñ³£¨S¤¶²Ð¥¦...
¨º·Q½Ð°Ý¤j¤j¡A°£¤F¤W­z¥\¯à¥~¡A¦³¬Æ»òEvaluate±`¥Îªº¥Îªk¶ÜOwO?
ÁÂÁ«ü±Ð!

TOP

¦^´_ 9# ­ã´£³¡ªL

³á³á§¹¥þÀ´¤F! ·PÁ±z¥J²Ó¦a¦^µª!!!
­ì¨ÓarrayÁÙ¦³¾î¦¡¸òª½¦¡ªº°Ï§O...§Ú¥H¬°´N¥u¬O¦s¦b°O¾ÐÅé¸Ì­±ªº¸ê®Æ¦Ó¤w¡A§Ú·R¥Î¬Æ»ò§Îª¬¶K¤W´N¥Î¤°»ò§Îª¬¶K¤W......®¦~Á`¤§·PÁÂ!

TOP

application.transpose
¬°¡eÂà¸m¡f¤§¥Î¡A­ì³]array°}¦C¬°¡e¾î¦¡¡f¡A¶·Âà¸m¤@¦¸¤~¯à¥H¡eª½¦¡-¥Ñ¤W¦Ó¤U¡f¶K¤JÄæ¦ì

application.evaluate
¥Î¨Ó±N¡e¤å¦r¦r¦ê¡fªº¡e­pºâ¦¡¡f¡A¥H¤u§@ªí¨ç¼Æ¤è¦¡ª½±µ­pºâ¥X¨äµ²ªG¡A
¨Ò¦p¡GMsgBox Application.Evaluate("=A1>A2")
¦]½d¨ÒÃD¤¤§t¡e¤å¦r¡fªº¤ñ¸û¤j¤p¡AVBA»P¤½¦¡ªº¤ñ¸ûµ²ªG¬O¤£¤@¼Ëªº¡A
¬°¤F¹F¨ìVBA±Æ§Çªºµ²ªG¯à»P¤u§@ªí±Æ§Çµ²ªG¤@­P¡A©Ò¥H§Q¥Î¤FEvaluate¡A
­Y¬O¡e¯Â¼Æ­È¡fªº¤ñ¸û¡Aª½±µ¨Ï¥Î a>B §Y¥i¡C

TOP

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-3 00:19 ½s¿è

¦^´_ 6# ­ã´£³¡ªL

§Ú·|¥Îsorting¥\¯à ¦ý¬O§Úªº¸ê®Æ¦³¼ÐÅÒ¸¹½X §Ú­n±Æ§Ç§¹«áÁÙ¯àŪ¨ú¬Û¹ïÀ³ªº¼ÐÅÒ¸¹½X
¦Ó¥B§Ú¦P®É³B²z¦hºØ¸ê®Æ
©Ò¥H¤£·Q¶K¨ìworksheet¤W­±³B²z
µM«á­è¼Ó¤W´£¨ìªº¤èªk§Ú¤§«e¤]¨S·Q¹LxD
¥Øªº¬O­n§ä¦hºØ¸ê®Æ±Æ¦W«e100¤jªº¸ê®Æ¥æ¶°ªº¼ÐÅÒ¸¹½X

¥t¥~¡A§Ú¥i¥H°Ý±zapplication.transposeªº°ÝÃD¶Ü? ¥L¦n¹³¥u¬O³æ¯Â¶K¤Wªº¥\¯à?!!
ÁÙ¦³application.evaluate¡A³o¦n¹³¦³«Ü¦h¥\¯à....? ¨ä¤¤¤@ºØ¦n¹³¬O¥i¥H§â¦r¦êÅܼƭÈ? ÁÙ¦³¨ä¥L...? ¤£¤ÓÀ´
Áٽнç±Ð!

TOP

¥»©«³Ì«á¥Ñ VBALearner ©ó 2016-8-3 00:18 ½s¿è

¦^´_ 5# ML089

³á³á·PÁ±z!!
§â½s½X¥[¦b«á­±ªº¤èªk¯u¬O¤ÓÁo©ú¤F!!!

TOP

EXCEL¥»¨­ªº±Æ§Ç¥\¯à³Ì¦n¥Î, ¤]¾A¦X¤j³¡¥÷ªº¸ê®Æ«¬ºA(¤×¨ä¬O¦hÄæ¦ìªº¸ê®Æ),
¬°¦ó¤£¥Î¥¦???

TOP

¦^´_ 3# VBALearner

¦p¦óª¾¹D±Æ¦W«e5¤j¼Æ­Èªº­ì©l¼ÐÅÒ(´N¬O­ì¥»ªº1~10±Æ§Ç³Q¥´¶Ã«á ¦p¦ó©I¥s)?

¥i¥H
1. ¨Ï¥Î2­Ó¤@ºû°}¦C¡A¤@­Ó¬ö¿ý­ì©l¼ÐÅÒ(©Î¶¶¦ì)¡A¤@­Ó¬ö¿ý¸ê®Æ°}¦C
2. ¨Ï¥Î2ºû°}¦C¡A¤@ºû¬ö¿ý­ì©l¼ÐÅÒ(©Î¶¶¦ì)¡A¥t¤@ºû¬ö¿ý¸ê®Æ°}¦C
3. ©Î­ì©l¸ê®Æ»P­ì©l¼ÐÅÒ¦X¨Ö¡A
¨Ò¦p  
1  33 ¦X¨Ö¬° 33001
2  11 ¦X¨Ö¬° 11002
3  44 ¦X¨Ö¬° 44003
±Æ§Ç«á¨ú¸ê®Æ«á3½X´N¬O­ì©l¼ÐÅÒ(©Î¶¶¦ì)
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD