老师,我想知道这个怎么反过来
|
|
u517840121
展开
|
|
|
pop0937
展开
老师好,下面是我写的代码,有个问题,复制到G列,但是G1空的,我用cells(rows.count,"g")(2,1) 问题来了,怎么才从G1开始 Private Sub Test() Dim i For i = 1 To Cells.Find("*", Cells(1, 1), xlValues, xlWhole, xlByColumns, xlPrevious).Column Range("a1:a5").Offset(0, i - 1).Copy Cells(Rows.Count, 7).End(xlUp)(2, 1) Next End Sub 舸邶
展开
@ pop0937 Dim i, r For i = 1 To Cells.Find("*", Cells(1, 1), xlValues, xlWhole, xlByColumns, xlPrevious, 0, 0).Column Range("a1:a5").Offset(0, i - 1).Copy If Cells(Rows.Count, 7).End(xlUp).Row = 1 Then Cells(Rows.Count, 7).End(xlUp).Select Else Cells(Rows.Count, 7).End(xlUp).Offset(1).Select End If ActiveSheet.Paste Next |
|
|
东风风行汽车刘巍
展开
|
|
|
xjh673283912
展开
|
本站有权保留或删除有争议评论。 参与本评论即表明您已经阅读并接受上述条款。