[Power=5] <p>Sub 第1题()<br/>Dim x<br/> For x = 1 To 14<br/> If Cells(x, 1) = "" And Cells(x, 2) = "" Then<br/> Rows(x).Hidden = True<br/> End If<br/> Next x<br/>End Sub</p><p>Sub 第2题()<br/>Dim x As Integer<br/>For x = [a65536].End(xlUp).Row To 3 Step -1<br/> Rows(x & ":" & x + 1).Insert<br/>Next x<br/>End Sub</p><p><br/>Sub 第3题()<br/>MsgBox Range("A1:d12").Find("", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Address<br/>End Sub</p><p><br/>Sub 第4题()<br/>Dim x As Integer<br/> For x = 2 To 12<br/> Cells(x, 6) = Cells(x, 5).End(xlToLeft).Value<br/> Next x<br/>End Sub</p><p>Sub 第5题()<br/>Dim MRG As Range<br/> For Each MRG In Range("a1:d12")<br/> If MRG >= "D" And MRG <= "W" Then<br/> If Application.CountIf([F:F], MRG.Value) = 0 Then<br/> [F65536].End(xlUp).Offset(1, 0) = MRG.Value<br/> End If<br/> End If<br/> Next MRG<br/>End Sub</p><p>Sub 第6题()<br/>Dim x<br/> For x = [a65536].End(xlUp).Row To 2 Step -1<br/> If Cells(x, 1) = Cells(x - 1, 1) Then<br/> Application.DisplayAlerts = False<br/> Range(Cells(x, 1), Cells(x - 1, 1)).Merge<br/> Application.DisplayAlerts = True<br/> End If<br/> Next x<br/>End Sub</p><p>Sub 第7题()<br/>Dim k As Integer, x As Integer, m As Integer<br/>k = [c65536].End(xlUp).Row + 1<br/>For m = Application.CountA([a1:a15]) To 2 Step -1<br/> x = 0<br/> Do<br/> k = k - 1<br/> x = x + Cells(k, 3)<br/> Loop Until Cells(k, 1) <> ""<br/> Cells(k, 4) = x<br/> Next m<br/>End Sub<br/>照抄答案,慢慢消化了[em01]</p><p>[/Power]</p><p>+7</p>
[此贴子已经被laosanjie于2008-6-16 12:44:18编辑过] |