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

[µo°Ý] ½Ð°Ý¥i¥H§Q¥Îvba¨Ó¹F¨ì¦Û°ÊÂ_¦æªº®ÄªG¶Ü?

[µo°Ý] ½Ð°Ý¥i¥H§Q¥Îvba¨Ó¹F¨ì¦Û°ÊÂ_¦æªº®ÄªG¶Ü?

¨Ò¦p:§Ú¦b"B2"Àx¦s®æ¤¤¿é¤J    "¦WºÙ1,¦WºÙ2,¦WºÙ3,¦WºÙ4,¦WºÙ5,¦WºÙ6,¦WºÙ7,¦WºÙ8,¦WºÙ9,¦WºÙ10,¦WºÙ11"
§Ú·Q­n¥H³r¸¹¬°¨Ì¾Ú¡A·í¹J¨ì²Ä4­Ó³r¸¹«á~¤U¤@­Ó¤å¦r~¦Û°Ê¸õ¨ì¤U¤@¦æ(¦³¦pALT+ENTER)¡A¥H¤W"B2"Àx¦s®æ¨Ó»¡¡A
"B2"«hÅܦ¨:
¦WºÙ1,¦WºÙ2,¦WºÙ3,¦WºÙ4,
¦WºÙ5,¦WºÙ6,¦WºÙ7,¦WºÙ8,
¦WºÙ9,¦WºÙ10,¦WºÙ11
½Ð°Ý¦¹¥¨¶°¦p¦ó³]??
¥t¥~½Ð°Ý¦pªGÀx¦s®æ¤¤¦³Â_¦æ¡A­n¦p¦ó§Q¥Î¥¨¶°«ì´_???

¦^´_ 1# ´Ñ»y³¾»ï
­Y³æ¯Â¥u¬O¹ïÀx¦s®æ¤º®e°µ¦Û°ÊÂ_¦æ³B²z¨º¬O°µ±o¨ìªº.

¦ý­Y·Q¦b¿é¤J¹Lµ{¤¤´N­n³B²zªº¸Ü,
§Ú¥Ø«eÁÙ¨S¸Õ¥X¤èªk,
©Ò¥H´N¥ý´£¨Ñ¤@¥bªº¥\¯àÅo.
¦Û°ÊÂ_¦æ-Ans.zip (11.88 KB)

TOP

¦^´_ 2# luhpro


    ÁÂÁ±z³o»ò¼ö¤ßªº¦^ÂÐ~¤£¹L.....§Ú·Q­nªº¬O~Åý¥LÂ_¦æ«á~¸ê®ÆÁÙ¬O¦b"¦P¤@­Ó"Àx¦s®æ¡A¦Ó¤£¬O¤À¶}ªº!
¦Ó¨ä¸ê®Æ~¬O¥þ³¡¿é¤J§¹¦AÂ_¦æ§Y¥i!

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2011-10-1 17:08 ½s¿è

¦^´_ 3# ´Ñ»y³¾»ï
³á...
¨º´N«Ü²³æ¤F, ¥u­n¦³©³¤Uªºµ{¦¡´N¥i¨ä¥Lªº³£¥i¥H®³±¼¤F :
  1. Private Sub Worksheet_Change(ByVal Target As Range)
  2.   Dim sStr$
  3.   Dim iI%
  4.   Dim lJ As Long, lLen As Long
  5.   
  6. On Error GoTo ErrorHandler

  7. Application.EnableEvents = False
  8.   With Target
  9.     sStr = .Value
  10.     lLen = Len(sStr)
  11.     iI = 0
  12.     lJ = 1
  13.     Do While lJ < lLen
  14.       If Mid(sStr, lJ, 1) = "," Then iI = iI + 1
  15.       If iI = 4 Then
  16.         .Value = Left(sStr, lJ) & Chr(10) & Right(sStr, Len(sStr) - lJ)
  17.         sStr = .Value
  18.         lLen = Len(sStr)
  19.         lJ = lJ + 1
  20.         iI = 0
  21.       End If
  22.       lJ = lJ + 1
  23.     Loop
  24.   End With
  25. Application.EnableEvents = True
  26. Exit Sub

  27. ErrorHandler:
  28.     Select Case Err.Number
  29.       Case 13 ' §R°£¦C·|¾É­P Target ¬° Null ¦¹®É¤Þ¥Î .Value ·|µo¥Í¿ù»~
  30.         sStr = ""
  31.     End Select
  32.     Resume Next
  33. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# luhpro


  ¤£¦n·N«ä~¦pªG§Ú·Q¥H«ö¶s¤è¦¡§e²{(¦Ó¤£¬O¥hÂIÀ»)¡A¥B¥u·Q¹ï¬Y­Ó½d³òªºÀx¦s®æ(¨Ò¦pB2:B10)¶i¦æÂ_¦æ¡A½Ð°Ý­n¦p¦ó­×§ï¦¹µ{§Ç??

TOP

  1. Sub ¤À¦æ()
  2. Dim A As Range, Ar()
  3. For Each A In Selection
  4.    mystr = A
  5.    For i = 1 To Len(A)
  6.    If Mid(A, i, 1) = "," Then s = s + 1
  7.        If s Mod 4 = 0 And Mid(A, i, 1) = "," Then
  8.         mystr = Application.WorksheetFunction.Replace(mystr, i, 1, Chr(10))
  9.        End If
  10.    Next
  11.    A = mystr: s = 0
  12. Next
  13. End Sub
  14. Sub ´_­ì()
  15. For Each A In Selection
  16. A.Value = Replace(A, Chr(10), ",")
  17. Next
  18. End Sub
½Æ»s¥N½X
¦^´_ 5# ´Ñ»y³¾»ï
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh


    ­ì¨ÓmidÁÙ¦³³oºØ¥\¯à!·PÁ±zªº¦^ÂÐ!¬Ý¨Ó§Ú­n¦h¾Ç¾Ç¨ç¼Æ¥[¥¨¶°ªºÀ³¥Î!

TOP

        ÀR«ä¦Û¦b : §ïÅܦۤv¬O¦Û±Ï¡A¼vÅT§O¤H¬O±Ï¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD