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

½Ð°Ý¦p¦ó³]©w¬ö¿ýÀÉ

½Ð°Ý¦p¦ó³]©w¬ö¿ýÀÉ

½Ð°Ý¥Ø«e¦³¤@­ÓEXCELÀÉ
¥DÀɬ°¿é¤J¤º®e
¦p¦ó¦Û°Ê¦s¨úÂà´«¦¨¬ö¿ýÀɪº®æ¦¡

¬ö¿ýÀÉ.rar (5.25 KB)

Tony

¦^´_ 16# register313
¥t¤@°j°é For
  1. Sub Ex2()
  2.     Dim A As Range, i As Integer, R1 As Integer, Rng As Range
  3.     For Each A In Sheets("¥DÀÉ").UsedRange
  4.       A.Value = Trim(A)
  5.     Next
  6.     Sheets("¬ö¿ýÀÉ2").UsedRange.Offset(1).Clear
  7.     With Sheets("¥DÀÉ")
  8.         For i = 2 To .Cells(Rows.Count, "A").End(xlUp).Row Step 3
  9.             Set Rng = .Range(.Cells(i, "D"), .Cells(i, "D").End(xlToRight)).Resize(3)
  10.             With Sheets("¬ö¿ýÀÉ2")
  11.                 R1 = .Cells(Rows.Count, "a").End(xlUp).Offset(1).Row
  12.                 .Cells(R1, "A").Resize(Rng.Columns.Count) = Rng.Cells(1, -2)
  13.                 .Cells(R1, "B").Resize(Rng.Columns.Count) = Rng.Cells(1, -1)
  14.                 .Cells(R1, "C").Resize(Rng.Columns.Count, 3) = Application.Transpose(Rng)
  15.                 .Cells(R1, "G").Resize(Rng.Columns.Count) = Rng.Cells(1, 0)
  16.             End With
  17.         Next
  18.     End With
  19. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ register313 ©ó 2011-12-21 09:55 ½s¿è

¬ö¿ýÀÉ.zip (10.26 KB) ¦^´_ 15# tonycho33


     ­×§ïGBKEE¤§ ¬ö¿ýÀÉ.XLS

¬ö¿ýÀÉ.zip (10.26 KB)

TOP

¦^´_ 4# GBKEE


    ½Ð°Ý¥DÀÉsheet·QÂন°O¿ýÀÉ2sheet
­n«ç»ò§ïµ{¦¡

¬ö¿ýÀÉ.rar (3.39 KB)

Tony

TOP

¦^´_ 13# tonycho33

    excel 2003 °õ¦æµL»~
    ¬ö¿ýÀÉ.zip (8.73 KB)

TOP

½Ð°Ý¬°¤°»òrun°_¨Ó«á¡A°õ¦æ«Ü¤[,«öesc«h°±¯d¿ù»~¦bNext¤W
a.Value = Trim(a)
     Next
Tony

TOP

¦^´_ 11# tonycho33

Option Explicit
Sub Ex()
    Dim R As Integer, R1 As Integer, Rng As Range, Rng1 As Range, a As Range
     For Each a In Sheets("¥DÀÉ").UsedRange
      a.Value = Trim(a)
    Next
    R = 2: R1 = 2
    Sheets("¬ö¿ýÀÉ").UsedRange.Offset(1).Clear
    Sheets("¥DÀÉ").Activate
    Do
        Set Rng = Sheets("¥DÀÉ").Range(Cells(R, "D"), Cells(R, "D").End(xlToRight)).Resize(3)
            With Sheets("¬ö¿ýÀÉ")
            .Cells(R1, "A") = Cells(R, "A")
            .Cells(R1, "B") = Cells(R, "B")
           R1 = R1 + 1
            .Cells(R1, "C").Resize(Rng.Columns.Count, 3) = Application.Transpose(Rng)
            .Cells(R1, "G").Resize(Rng.Columns.Count) = Cells(R, "C")
            R1 = R1 + Rng.Columns.Count
        End With
        R = R + 3
    Loop While Cells(R, "D") <> ""
End Sub

TOP

¥[¤J«á¡A¥X²{¸ê®Æ«¬ºA¤£²Å ¿ù»~¥N½X¡G13
Tony

TOP

¦^´_ 9# tonycho33


For Each a In UsedRange
    a.Value = Trim(a)
Next
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¤èªk2:§Q¥ÎVBA RTRIM»PLTRIM  ±N¨C­ÓÀx¦s®æ¤ºªº¤£¥i¨£¦r¤¸²M°£

½Ð°Ý«ü¥O­n¦p¦ó¤U©O
ÁÂÁÂ
Tony

TOP

        ÀR«ä¦Û¦b : §g¤l¬°¥Ø¼Ð¡A¤p¤H¬°¥Øªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD