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

[µo°Ý] Àx¦s®æ¦r¦êªø«×¤j©ó255

[µo°Ý] Àx¦s®æ¦r¦êªø«×¤j©ó255

¦U¦ì¤j­ô¦n,¤p§Ì¦³¤@¨Æ·Q½Ð±Ð,
°²³]¤µ¤Ñ¤@Àx¦s®æ¤ºªº¤º®e¬°aaaaaaaa-aaaaa-aaa-aa-aa-a-a-.....................aaa-a-a-a-a-a-....
Àx¦s®æ¤ºªº¤å¦rªø«×¤j©ó255,·Q­n¨Ì¨C3­Ó-²Å¸¹°µ´«¦æ,¦³¿ìªk°µ¨ì¶Ü?
¥i¥H½Ð¦U¦ì¤j­ô±Ð±Ð§Ú¶Ü?   ÁÂÁÂ!

ÁÂÁ¦U¦ì¤j­ô!

TOP

¦^´_ 15# a77261988
  1. Sub nn()
  2. Dim A As Range, i%, s%
  3. If Application.CountA(Selection.EntireColumn) = 0 Then Exit Sub 'ÁקKÄæ¦ìµL¸ê®Æ
  4. For Each A In Selection.EntireColumn.SpecialCells(xlCellTypeConstants)
  5. i = 0: s = 0: A = Application.WorksheetFunction.Substitute(A, Chr(10), "") '¨ú®ø´«¦æ²Å¸¹
  6. Do Until InStr(Mid(A, i + 1), "-") = 0
  7.   i = InStr(i + 1, A, "-")
  8.   s = s + 1
  9.   If s Mod 3 = 0 Then A = Application.WorksheetFunction.Replace(A, i, 1, "-" & Chr(10))
  10. Loop
  11. Next
  12. Selection.EntireColumn.AutoFit
  13. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

oobird¤j­ô,¦A½Ð°Ý¤@¤U,¦³¿ìªk±N©T©wªº[d1000]Åܦ¨·Æ¹«ÂI¿ïªº¾ã¦Ccolumn¶Ü?

TOP

¤£·|¦³ªÅ¥Õªº¡A¥þ¿ï~§â®æ¦¡~¹ï»ô¤è¦¡¿ï"¾a¤W¹ï»ô"¡A«e­±´N¤£·|ªÅ¤F¡I
µ{¦¡½X®M¥ÎGBKEEª©¥Dªº¥N½X®Ä²v·|§ó°ª¡G
  1. Sub yy()
  2.     For r = 1 To [d1000].End(3).Row
  3.         W = Cells(r, 4).Value
  4.         W = Replace(W, "-", "-,")
  5.         W = Split(W, ",")
  6.         For xi = 2 To UBound(W) Step 3
  7.             W(xi) = W(xi) & Chr(10)
  8.         Next
  9.         Cells(r, 4) = Trim(Join(W))
  10.     Next
  11. End Sub
½Æ»s¥N½X

TOP

oobird¤j­ô,¦]¬°­ì¥»ªº¸ê®Æ§ó¦h§óªø,
»Ý­n³z¹L¥Ñ´X­Ó²Å¸¹´«¦æ¨ÓÀ˵ø¸ê®Æ,©Ò¥H¦³³o­Ó»Ý¨D,
µ{¦¡§¹¥þ¹F¨ì§Úªº»Ý¨D,«D±`ªº·PÁ§A,
¦ý¬O¦³¤@­ÓºÃ°Ý´N¬O,·í¸ê®Æ¾ã²z§¹¤§«á,
±NÀx¦s®æ©Ô¶},«e­±·|¦³«Ü¦hªÅ¥Õ³B,³o¬O¤°»ò­ì¦]©O?

TOP

³o¼Ë¾ã²z¤£¬OÅã±o§ó¶Ã¡H
  1. Sub yy()
  2.     For r = 1 To [d1000].End(3).Row
  3.         w = Cells(r, 4).Value
  4.         For i = 1 To Len(w)
  5.             If Mid(w, i, 1) = "-" Then
  6.                 j = j + 1
  7.                 If j = 3 Then
  8.                     Mid(w, i, 1) = ",": j = 0
  9.                 End If
  10.             End If
  11.         Next
  12.         Cells(r, 4) = Trim(Replace(w, ",", "-" & vbLf))
  13.     Next
  14. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# a77261988
  1. Option Explicit
  2. Sub Ex()
  3. Dim W As Variant, xi As Integer
  4.     W = "1aaaaaaaa-aaaaa-aaa-2aa-aa-a-3a-aaaaa-aaa-4aa-aa-a-a-aaaaa- aaa - aa - aa - a - a - aaaaa - aaa - aa - aa - a - a - aaaaa - aaa - aa - aa - a - a - aaaaa- aaa - aa - aa - a - a - aaaaa - aaa - aa - aa - a - a - aaaaa - aaa - aa - aa-a-a-aaaaa- aa -aa - aa - a - a - aaaaa - aaa - aa - aa - a - a - aaaaa - aaa - aa - aa - a - a - aaaaa - aaa - aa - aa - a - a"
  5.     W = Replace(W, "-", "-,")
  6.     W = Split(W, ",")
  7.     For xi = 2 To UBound(W) Step 3
  8.         W(xi) = W(xi) & Chr(10)
  9.     Next
  10.     [a1] = Join(W, Chr(10))
  11. End Sub
½Æ»s¥N½X

TOP

oobird¤j­ô,¤j·§¬O³o¼Ë¤l,µM«á§Ú·Q¹ïD Column°µ¾ã²z.
³Â·Ð§A¤F,ÁÂÁÂ!

EX.rar (6.96 KB)

TOP

¥u­nÀx¦s®æ¸Ìªº¦r¤¸ªø«×¤j©ó255,´N·|¨S¿ìªk§@±Æ§Ç¾ã²z
À³¸Ó¨S³o­Ó¹D²z¡AÀx¦s®æ¥i¥HÅã¥Ü1024­Ó¦r¤¸
­n¾ã²z¦h­ÓÀx¦s®æ¡A³Ì¦n¤W¶Çªþ¥ó¡A¥H¤F¸Ñ§A­n³B²zªº°Ï°ì

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD