- Dim i&, R As Range, Y%
- i = 2: Y = 1
- With Sheet2
- Do While .Cells(i, "b") <> ""
- Set R = .Cells(i, "b")
- With Sheet1.Cells(i - 1, Y)
- .Value = R & Chr(10) & R(1, 2) & R(1, 3) & R(1, 4) & Chr(10) & Chr(10) & R(1, 5) & Space(20) & R(1, 6) & "收" & Chr(10)
- .ColumnWidth = 33
- .Borders.LineStyle = xlContinuous
- .HorizontalAlignment = xlLeft
- .VerticalAlignment = xlCenter
- .IndentLevel = 1
- End With
- If Y = 1 Then
- Y = 1: i = i + 1
- Else
- Y = Y + 1
- End If
- Loop
- End With
- ' Sheet1.PrintOut
- End Sub
複製代碼 這程式碼是抄用其他大大所寫,我想改變資料寫入方式,1.原始方式是a1'b1'c1'''''向下寫入,可否改成a1,b1,c1,d1,e1,f1,再跳a2,b2,c2,d2,e2,f2。
2. R(1, 2)字大小10,R(1, 6)字大小14。自己想了許久就是無法達成,請先進幫忙。 |