|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
- Sub 按钮1_Click()
- Application.ScreenUpdating = False
- arr = Sheets("Sheet1").[a1].CurrentRegion
- a = 2
- For j = 2 To UBound(arr)
- If InStr(arr(j, 3), "-") > 0 Then
- brr = Split(arr(j, 3), "-")
-
- Cells(a, 1) = arr(j, 1) & "-" & brr(0)
- Cells(a, 2) = arr(j, 2)
- Cells(a, 3) = arr(j, 3)
-
- a = a + 1
-
- For i = Val(brr(0)) + 1 To Val(brr(UBound(brr)))
-
- Cells(a, 1) = i * (-1)
- a = a + 1
- Next i
- End If
- Next j
-
- ActiveSheet.UsedRange.Borders.LineStyle = xlContinuous
- Application.ScreenUpdating = True
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|