|
Vba80集第11集Sub 题目1()
On Error Resume Next
Range("a1:c11").Select
Dim rg As Range
For Each rg In Range("a1:c11")
If IsNumeric(rg) Then
If rg > 0 Then GoSub 100
End If
Next rg
Exit Sub
100
rg = "正数"
Return
End Sub
Vba80集第11集Sub 题目2()
Dim rg As Range
Dim x As Integer
Dim y As Integer
For y = 1 To 3
For x = 2 To 12
If IsNumeric(Cells(x, y)) < 0 Then
If Cells(x, y) > 0 Then
If x = 2 And y = 1 Then Set rg = Cells(x, y)
Set rg = Union(rg, Cells(x, y))
End If
End If
Next x
Next y
rg.EntireRow.Select
End Sub
|
|