|
本帖最后由 wyf22006 于 2011-10-28 21:12 编辑
- [code]
- Sub kk() '改为正数
- Dim rng As Range
- For Each rng In Selection
- If rng.Value > 0 And IsNumeric(rng.Value) Then
- rng.Value = "正数"
- End If
- Next
- End Sub
- Sub nn() '选取不连续的行
- Dim rc As Integer, rr As Integer, rg As Range
- For rc = 1 To 3
- For rr = 2 To 12
- If IsNumeric(Cells(rr, rc)) = True And Cells(rr, rc) > 0 Then
- If rr = 2 And rc = 1 Then Set rg = Cells(rr, rc)
- Set rg = Union(rg, Cells(rr, rc))
- End If
- Next
- Next
- rg.EntireRow.Select
- End Sub
复制代码
我没有权限使用[hide]
[/code]
|
|