ªð¦^¦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ªº¤è¦¡?!

¦^´_ 2# kaiclous

¸Õ¥Î¤F¨äµ{¦¡½X¤§«á §Ú¦³´X­Ó°ÝÃD·Q¦A½Ð±Ð

²Ä¤@­Ó´N¬Oapplication.transpose¦b¸Ì­±ªº¥\¯à¬O¬Æ»ò? ¥u¬O³æ¯Â¶K¤W¦Ó¤w¶Ü? §Ú«Ü¤Ö¬Ý¨ì³o­Ó¥\¯à...
²Ä¤G­Ó¬Oapplication.evaluate¬O¬Æ»ò·N«ä? §Ú§ä¤F¤@¨Ç¤å³¹ ÁÙ¬O¤£¤Ó²M·¡¥Lªº¥\¯à ¥uª¾¹D¦n¹³¬O­ÓÆZ¦n¥Îªº»yªk..?!
²Ä¤T­Ó´N¬O­ì¥»ªº°ÝÃD¡A§ÚÁÙ¬OµLªk±oª¾¦b­ì¥»ªº¸ê®Æ§Ç¦C¸Ì¡A±Æ¦æ«e´Xªº¸ê®Æ½s¸¹¬O¨º¨Ç¡A³o¥u¬O³æ¯Â±Æ§Ç¸ê®Æ¼Æ­È¦Ó¤w¡AÁÙ½Ðk¤jÀ°¦£¦A¬Ý¥J²Ó§Úªº°ÝÃD¡AÁÂÁÂ~

TOP

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

¦^´_ 5# ML089

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

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

¦^´_ 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

¦^´_ 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

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

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

TOP

        ÀR«ä¦Û¦b : ¡i¬°µ½Ävª§¡j¤H¥Í­n¬°µ½Ävª§¡A¤À¬í¥²ª§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD