|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub kj()
- Dim arr, brr
- Application.ScreenUpdating = False
- With Sheets("Sheet2")
- arr = .Range("b1:h" & .Cells(.Rows.Count, 2).End(3).Row)
- End With
- ReDim brr(1 To UBound(arr), 1 To UBound(arr, 2))
- For i = 1 To UBound(arr)
- For j = 1 To UBound(arr, 2)
- brr(i, j) = Left(arr(i, j), 3)
- Next
- Next
- With Sheets("Sheet3")
- .Range("b1:b" & .Rows.Count).ClearContents
- .Range("b1").Resize(UBound(arr), UBound(arr, 2)) = brr
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码 |
评分
-
2
查看全部评分
-
|