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

[µo°Ý] ¦p¦ó±Nvba¼Ò²Õ°µ¦¨¨ç¼Æ«ü¥O¡A´O¨ì¨t²Î¸Ì

[µo°Ý] ¦p¦ó±Nvba¼Ò²Õ°µ¦¨¨ç¼Æ«ü¥O¡A´O¨ì¨t²Î¸Ì

½Ð±Ð¦U¦ì¤j¤j
¤p§Ì¦b¼g¨ç¼Æ¦¡¡A¦]§ä¤£¨ì¹³vba¸ÌSplit«ü¥Oªº¥\¯à¡A©Ò¥H¥Îvba¼g¤F¤@­Ó¦^¶Ç¥¨¶°¡A¦p¤U
½Ð°Ý­n¦p¦ó±NSplitRun°µ¦¨ excel¸Ìªº¨ç¼Æ«ü¥O©O??  ¦psum¡Bavg.....µ¥¨ç¼Æ¥iª½±µ¥s¥Î¡A¦Ó¤£¬O¨C¦¸³£­n¼g¤@¦¸¼Ò²Õ

Àx¦s®æ
H10 ¡G 5100-100421133
H11 ¡G=splitrun(H10,"-",1) = 5100

vba ¼Ò²Õ ¦p¤U

Function SplitRun(«ü©w, ²Å¸¹, ¦^¶Ç§Ç¸¹)

  Dim StrRun
  StrRun = Split(«ü©w, ²Å¸¹)
   SplitRun = StrRun(¦^¶Ç§Ç¸¹ - 1)

End Function
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

¦^´_ 1# ·t¶Â


    ¦s¦¨¼W¯q¶°xla,¸ü¤J¼W¯q¶°
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2010-7-23 00:06 ½s¿è

§A¥i°Ñ¦Ò VBA ªº»¡©ú¤¤Ãö©ó MacroOptions ¨ç¼Æªº¥Îªk»P½d¨Ò.

Sub AddUDFToCustomCategory()
    Application.MacroOptions Macro:="SplitRun", Description:="¥¨¶°ªº»¡©ú", Category:="§ÚªºÃþ§O"
End Sub

Function SplitRun(«ü©w, ²Å¸¹, ¦^¶Ç§Ç¸¹)

  Dim StrRun
  StrRun = Split(«ü©w, ²Å¸¹)
   SplitRun = StrRun(¦^¶Ç§Ç¸¹ - 1)
End Function

¦¹ªk¤¤©Ò«Ø¥ß¥X¨Óªº¨ç¼Æ¥u¯à¥Î©ó¸Óµ{¦¡©Ò¦bªºÀÉ®×,
¦ý¦sÀÉ«á§Y¥i¤@ª½¨Ï¥Î¦Ó¤£¦A»Ý­n°õ¦æ¸Óµ{¦¡.

TOP

¦A½Ð±Ð..
SplitRun¤w¦s¦¨¼W¯q¶°¨Ã¸ü¤J¤F¡A
¨º­n¦p¦ó¦bvba½s¿è¾¹¤¤¡A¤£­n¥X²{SplitRun¼W¯q¶°©O
¬O¾Çµ{¦¡¦Ó¤£¬O­nµ{¦¡¡A¬O¶i¨Bªº°ò¦

TOP

¥»©«³Ì«á¥Ñ ANGELA ©ó 2010-7-29 10:42 ½s¿è
¦A½Ð±Ð..
SplitRun¤w¦s¦¨¼W¯q¶°¨Ã¸ü¤J¤F¡A
¨º­n¦p¦ó¦bvba½s¿è¾¹¤¤¡A¤£­n¥X²{SplitRun¼W¯q¶°©O
·t¶Â µoªí©ó 2010-7-23 08:16



       §Ú¤]«Ü·Qª¾¹D¬O§_¯àíÂüW¯q¶°,¥[¦h¤F§ä°_¨Ó·|·Pı«Ü¶Ã.»Ý¥B¤@¯ë¤]¤£·|­×§ï¼W¯q¶°.
    ÁÙ¦³¦³®É¦b«öF8Àˬdµ{¦¡½X®É,°õ¦æ¨ì¤¤¶¡®É·|¸õ¥h°õ¦æ¼W¯q¶°,¯u©Ç.

TOP

§Ú¤]«Ü·Qª¾¹D¬O§_¯àíÂüW¯q¶°,¥[¦h¤F§ä°_¨Ó·|·Pı«Ü¶Ã.»Ý¥B¤@¯ë¤]¤£·|­×§ï¼W¯q¶°.
    ÁÙ¦³ ...
ANGELA µoªí©ó 2010-7-29 10:21

±Nµ{¦¡¦s©óPersonal.xls (­Ó¤H¥¨¶°¬¡­¶Ã¯) ¤]¬O¦³¼W¯q¶°ªº®ÄªG

TOP

        ÀR«ä¦Û¦b : ¤f»¡¦n¸Ü¡B¤ß·Q¦n·N¡B¨­¦æ¦n¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD