網路城邦
上一篇 回創作列表 下一篇  字體:
EXCEL combin2line
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
( 知識學習語言 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=92girls&aid=3210961

 回應文章

Alice甯 (拉不拉多)
等級:7
留言加入好友
........
2009/08/13 09:19
EXCEL - I know
combine - I know
2 line - I know

But, EXCEL combin2line - I don't know