|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- 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
查看全部评分
-
|