字體:小 中 大 | |
|
|
2009/08/10 02:34:43瀏覽367|回應1|推薦0 | |
Sub cam2line()
Worksheets("Sheet2").Select line01 = 0 sw01 = 1 shiftline01 = 5 Value2line01 = 0 Do Until sw01 = 0 line01 = line01 + 1 line02 = ((line01 - 1) * 3) + shiftline01 r1 = 0 For i = 1 To 14 r1 = r1 + 1 Value2line = Worksheets("Sheet1").Cells(line02, i) Worksheets("Sheet2").Cells(line01, r1) = Value2line Next line02 = ((line01 - 1) * 3) + shiftline01 + 1 For i = 1 To 14 r1 = r1 + 1 Value2line = Worksheets("Sheet1").Cells(line02, i) Worksheets("Sheet2").Cells(line01, r1) = Value2line Next Worksheets("Sheet2").Cells(line01, 1).Select Worksheets("Sheet3").Cells(line01, 1) = sw01 ckvalue = Worksheets("Sheet2").Cells(line01, 1) If (ckvalue = "") And sw01 > 0 Then sw01 = sw01 + 1 If (ckvalue = "") And sw01 > 2 Then sw01 = 0 If (ckvalue <> "") Then sw01 = 1 Loop End Sub 'Worksheets("Sheet3").Cells(line01, r1) = r1 |
|
( 知識學習|語言 ) |