|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Sub 竖列1()
Dim i&, n&
Dim sh As Worksheet
Application.DisplayAlerts = False
n = ThisWorkbook.Sheets.Count
For i = 1 To n
Set sh = Sheets(i)
If sh.Name <> "Sheet1" Then
sh.Range("i1:i1").Value = Range(Cells(i + 1, 7), Cells(i + 1, 50)).Value
End If
Next
Application.DisplayAlerts = True
End Sub
Sub 竖列2()
Dim i&, n&
Dim sh As Worksheet
Application.DisplayAlerts = False
n = ThisWorkbook.Sheets.Count
For i = 1 To n
Set sh = Sheets(i)
If sh.Name <> "Sheet1" Then
sh.Range("i2:i2").Value = Range(Cells(i + 1, 7), Cells(i + 1, 50)).Value
End If
Next
Application.DisplayAlerts = True
End Sub
|
|