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

[µo°Ý] ½Ð°Ý¥i¤£¥H¦Û°Ê¶ñ¤W¼Æ¦r¦b¬Û¹ïÀx¦s®æ

[µo°Ý] ½Ð°Ý¥i¤£¥H¦Û°Ê¶ñ¤W¼Æ¦r¦b¬Û¹ïÀx¦s®æ

John-01---·N«ä«YJohnªº²Ä1ªO,¤U­±´N¬O²Ä¤@ªOªº¸ê®Æ,John-02´N¬O²Ä2ªO,¤U­±´N¬O²Ä2ªOªº¸ê®Æ.
¥H¦¹Ãþ±À.§Ú·Q±N²Ä¤@ªOªº¸ê®Æ«e­±¦h¥[¤W01..ie 01J0507001,01J0507002¥H¦¹Ãþ±À.°µ¨ì¦n³BColumn B¤@¼Ë

      A              B
       ref          Ref 02
John-01        01J0507001
J0507001        01J0507002
J0507002        01J0507003
J0507003        01J0507004
J0507004        02J0507006
John-02        02J0507007
J0507006        02J0507008
J0507007        02J0507009
J0507008        02J0507010
J0507009        02J0507011
J0507010        06J0507005
John-06        06J0507006
J0507005       
J0507005

¦^´_ 1# john2006168
  1. Sub nn()
  2. Dim Ar()
  3. For Each a In Range([A2], [A65536].End(xlUp))
  4.    If InStr(a, "-") > 0 Then
  5.    mystr = Split(a, "-")(1)
  6.    Else
  7.    ReDim Preserve Ar(s)
  8.    Ar(s) = mystr & a
  9.    s = s + 1
  10.    End If
  11. Next
  12. [B2].Resize(s, 1) = Application.Transpose(Ar)
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦Ñ®v
Thanks for your help.
12.[B2].Resize(s, 1) = Application.Transpose(Ar)
¦n¹³¦³°ÝÃD,¦æ¨ì³o¸Ì´N¤£¦æ¤F

TOP

¦^´_ 3# john2006168


    ¨S°ÝÃDªü aa.rar (6.89 KB)
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh
§Ú¥Î¦Ñ®vªºµ{¦¡¥N¶i³o­Óªí,¤£¦æ®@...ÀY«Üµh....help me.

            A                                   B
John#1005043-11
John0507001
John#1005043-12
John0705002
John#1005043-03
John507004
John507005
John507006
John507007

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-5-13 22:58 ½s¿è

¤å¦r®æ¦¡¤£¦P
³o¼Ëªº­²¬O­nÂন«ç¼Ëªº®æ¬O­n»¡©ú²M·¡
Âà¥X¨Ó³o¼Ë
ref        Ref 02
John#1005043-11        11John0507001
John0507001        12John0705002
John#1005043-12        03John507004
John0705002        03John507005
John#1005043-03        03John507006
John507004        03John507007
John507005       
John507006       
John507007
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

­ì¨Ó¬O³o¼Ë¤l,¨º¦Ñ®v§ÚÀ³¸Ó«ç»ò§ï

TOP

¦hÁ¦Ѯv...·dÕi®Í=ok
¥t¥~§Ú¦b­Óªí«Y(¦b)John0507001 ¥[¤W-03,µ{¦¡¦n¹³´N¨«¤£¤F,¤£ª¾¹D¥X¤F¤°»ò°ÝÃD??.

ref
John#1005043-11
John0507001-03
John#1005043-12
John0705002-04
John#1005043-03
John507004-05
John507005-07
John507006-08
John507007-09

TOP

§ï¦¨³o¼Ëªº®æ¦¡
John#1005043_11
John0507001_03
John#1005043_12
John0705002_04
John#1005043_03
John507004_05
John507005_07
John507006_08
John507007_09
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD