[µo°Ý]½Ð°Ý¿é¥X¦¨.TXTÀɮɥi¥H«ü©w¦bTXTÀɤ¤ªº¦ì¸m¶Ü?
- ©«¤l
- 77
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2011-3-2
|
[µo°Ý]½Ð°Ý¿é¥X¦¨.TXTÀɮɥi¥H«ü©w¦bTXTÀɤ¤ªº¦ì¸m¶Ü?
½Ð°Ý®æ¬°¤j¤j¡G
EXCEL¿é¥X¦¨.TXTÀɮɡA¥i¥H«ü©w¨C¤@Ä檺¸ê®Æ¶}ÀY±qþ¤@Ó¦ì¸m¶}©l¶Ü?
¦]¬°¿é¥X³øªí»Ý¨D¡A©Ò¦³¸ê®Æ¦C¤¤¡A¨C¤@Ä檺¸ê®Æ¶}ÀYªº¦ì¸m¥²¶·¤@P
¦]¸ê®Æªøµu¤£¤@¡A¤S§¨Âø¤¤¡B^¤å»P¼Æ¦r
©Ò¥H¤£ºÞ§Ú¥ÎLen¡BLenB¥hºâ¦P¤@Äõªº³Ì¤jªø«×¡A¨ä¾l¸ÉªÅ¥Õªº¤è¦¡¬ÒµLªk¶êº¡
©Ò¥H·Q½Ð°Ý¦U¦ì¤j¤j¯à§_ª½±µ«ü©w°_©l¦ì¸m?
©ÎÁÙ¦³¨ä¥L¸Ñ¨M¤è¦¡?
·P®¦ |
|
ASUS
|
|
|
|
|
- ©«¤l
- 77
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2011-3-2
|
¦^´_ 13# Hsieh
·PÁÂHsieh¤j¤j
§Ú¤j·§¦³¤C¡B¤K¦¨À´¤F
§Ú·|¸ÕµÛ¥Î³o¨Ç·§©À¨Ó¼g¤@Ó¨ç¼Æ¡A¤w¹ý©³¤F¸Ñ¨ä¥Îªk
·PÁ±z
³o¯u¬OÓÂצ¬ªº¤@¤Ñ |
|
ASUS
|
|
|
|
|
- ©«¤l
- 77
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2011-3-2
|
¥»©«³Ì«á¥Ñ asus103 ©ó 2011-1-19 16:52 ½s¿è
¦^´_ 11# Hsieh
·PÁÂHsieh¤j¤jªº¸Ñ»¡
§Ú¥i¥HÄ~Äò½Ð±Ð¶Ü?
1.For Each A In [A1:D1]
ad = Range(A, Cells(Cells.Rows.Count, A.Column).End(xlUp)).Address
ad¤£¬OA1:D11¶Ü?¬°¦ó¨C¤@¦¸²¾°Ê¤@Äæ¦Ó¤£¬O¤@ÓÀx¦s®æ
ans:§Ú¨Ï¥Î²Ä¤@¦C§@°j°é¡A©Ò¥Had¦r¦ê¬O¶Ç¦^¸Ó¦C¸ê®Æ½d³òªº¦ì§}
¤£¦n·N«ä¡A§ÚÁÙ¬O¤£À´¬O¦p¦ó§i¶DVBA¬O¦C§@°j°éªº
2.Ar(s) = Evaluate("MAX(LENb(" & ad & "))")
¤W¦¡¤§©Ò¥H¬O°}¦C¤½¦¡¬O¦]¬°" & ad & "ÁÙ¬O Evaluate
´«¨¥¤§¡AYn¦bVBA¤¤¨Ï¥Î°}¦C¤½¦¡nª`·N¬Æ»ò
¦pªG»¡¡G
°}¦C¤½¦¡¤¤ªº{}¥ÎEvaluate()¨ú¥N¡AEXCELªº¨ç¼Æ©Ò»Ý¤Þ¼Æ©ñ¤J¦r¦ê¤¤¨Ã¥Î" & & "¨Ó±a¤J
³o¼Ë¹ï¶Ü?
3.Evaluateªº¥Îªk§ÚÁÙ¶·¦h¥[µZ¿i¡A¥u¬O
"¨Ï¥ÎEvaluate¤èªk¤¤µ¥¦P¬O¤u§@ªí¨ç¼Æ¹Bºâ"¬°¦ó¤£¬O¨Ï¥Îapplication.---
¨ä¹ê§Ú¤]¸Õ¹L¥Îapplication.LenB()¥u¬O½sĶ¶¥¬q´N¥X¿ù¤F
¤£¦n·N«ä¡AÄ~Äò§ä±z³Â·Ð
¦pªG¦³¨ä¥L¦a¤è¦³Evaluateªº¥Îªk©Î¬OVBA¤¤¨Ï¥Î°}¦C¤½¦¡ªº¨Ï¥Î»¡©ú
·Ð½Ð§iª¾¡A§Ú·|¦A¦h¥[§V¤Oªº |
|
ASUS
|
|
|
|
|
- ©«¤l
- 77
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2011-3-2
|
¦^´_ 8# Hsieh
Hsieh¤j¤j±z¦n¡G
±zªºµ{¦¡½X¯u¬O¯«¥G¨ä§Þªü
·P®¦
µ{¦¡½X¤¤³\¦h¨Æ¨Ã¤£©ú¥Õ¡AÁٽЫü±Ð
1.For Each A In [A1:D1]
ad = Range(A, Cells(Cells.Rows.Count, A.Column).End(xlUp)).Address
ad¤£¬OA1:D11¶Ü?¬°¦ó¨C¤@¦¸²¾°Ê¤@Äæ¦Ó¤£¬O¤@ÓÀx¦s®æ
2.Ar(s) = Evaluate("MAX(LENb(" & ad & "))")
·Pı¤W¹³EXCEL¤¤°}¦Cªº¥Îªk¡A¦ý¹ê¦b´x´¤¤£¦í¬ªù©Ò¦b¡A¯à¸ÑÄÀ¤@¤U³oӥΪk¶Ü?
3.Evaluate("LenB(""" & test & """)") ªº¥Îªk¤]¬Ý¤£À´
§Ú§â¥¦§ï¦¨ LenB( test) «á³v¦æ°õ¦æ®ÉÁÙOK¡A¦ý³Ì«á¦ü¥GÅܦ¨µL½u°j°é¸õ¤£¥X¨Ó
Evaluate()¤w¤j¤jªº¥Îªk¦ü¥G¥Nªí¨ç¼Æ¬O¶Ü?¦ý»¡©ú¤¤¥u¦³¥¦¬O"¤èªk"ªº¥Îªk
4.§Ú¥Îlenb()¦bµ{¦¡¤¤±o¨ìªº²Ä2Äæ³Ì¤jȬ°26¡A¬°¦ó¤j¤j¯à±o¥¿½Tªº22
¬O§Úµ{«×¤Ó®t¤F¡A³o»ò¦h¬Ý¤£À´ªº¦a¤è
ÁٽФj¤j¦h¥[´£ÂI
·PÁ¦A·PÁ |
|
ASUS
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 8# Hsieh
¤j¤j¯u¬O¼F®`~ |
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¥»©«³Ì«á¥Ñ hugh0620 ©ó 2011-1-18 17:49 ½s¿è
¦^´_ 5# asus103
§Ú¦³°µ¤F¤@¨Ç½Õ¾ã~ ¤£¹LÁÙ¬O¦³¨Ç¦a¤è¦³ÂI¿ù»~ ½Ð¬d¾\ªþÀÉ~
¸ê®Æªøµu¤£¤@XC.rar (101.94 KB)
|
|
¾Ç²ß¤~¯à´£¤É¦Û¤v
|
|
|
|
|
- ©«¤l
- 77
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 118
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- office2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-12-24
- ³Ì«áµn¿ý
- 2011-3-2
|
¦^´_ 4# hugh0620
"VBA¦V«e½Ä"¤j¤j·PÁ±z
§Ú¤]·|¦A¦n¦n¬ã¨s±zªºµ{¦¡½Xªº
ÁÂÁÂ |
|
ASUS
|
|
|
|
|