hactnet 发表于 2012-4-1 20:24

本帖最后由 hactnet 于 2012-4-1 20:37 编辑

H组:hactnet

Private Sub CommandButton1_Click()
Range("i2:i7").ClearContents
End Sub
Private Sub CommandButton2_Click()
Dim x As Integer
For x = 2 To 10 Step 1
    Range("i" & x) = Range("i" & x).End(xlToRight).Value
Next x
End Sub

wenchduan 发表于 2012-4-1 20:32

Sub 查找月份()
Dim i%, j%
For i = 2 To 7
   For j = 8 To 2 Step -1
    If Cells(i, j) <> "" Then
    Cells(i, 9) = Cells(1, j)
    Exit For
    End If
   Next j
Next i

End Sub

Sub 清空()
    Range("I2:I7").Select
    Selection.ClearContents
End Sub
A 组长:wenchduan

chrissha 发表于 2012-4-1 20:36

c10: CHRISSHA

hrpotter 发表于 2012-4-1 20:36

C12:hrpotterSub 查找()
    Dim i As Byte, j As Byte
    For i = 2 To 7
      j = Cells(i, "i").End(xlToLeft).Column
      Cells(i, "i") = Cells(1, j).Value
    Next
End Sub
Sub 清空()
    Range("i2:i7").ClearContents
End Sub

linch92413 发表于 2012-4-1 20:37

E05:linch92413
Private Sub CommandButton1_Click()
   Dim R As Integer, i As Integer
   R = Range("a65536").End(xlUp).Row
   For i = 2 To R
      Cells(i, 9) = Application.Intersect(Rows(1), Cells(i, 10).End(xlToLeft).EntireColumn)
   Next i
End Sub

梅一枝 发表于 2012-4-1 20:38

Sub qing()
    Range("i2:i7").ClearContents
End Sub

Sub chazhao()
    Dim x As Integer
    Dim y As Integer
    For x = 7 To 2 Step -1
      If Cells(x, "h") > 0 Then
            Cells(x, "I") = "7月"
      Else
            Cells(x, "i") = Range("h" & x).End(xlToLeft).Column - 1 & "月"
      End If
    Next x
End Sub

兰江自由鱼 发表于 2012-4-1 20:39


Sub 清空()
Dim i As Integer
i = Range("a65535").End(xlUp).Row
Range("i2:i" & i).Clear
End Sub


Sub 查找月份()
Dim i As Integer
Dim j As Long
Dim k As Integer

j = Range("a65535").End(xlUp).Row
For i = 2 To j

k = Range("i" & i).End(xlToLeft).Column - 1
Range("i" & i) = "" & k & "月"

Next i

End Sub

zhouyunj 发表于 2012-4-1 20:40

已完成了,请老师批阅,谢谢!

jxncfxsf 发表于 2012-4-1 20:43

Sub zh()
Dim m, n As Integer
For m = 2 To 7
For n = 7 To 1 Step -1
If Cells(m, n + 1) <> "" Then
Cells(m, 9) = n & "月"
Exit For
End If
Next n
Next m
End Sub

shengxudong 发表于 2012-4-1 20:44

本帖最后由 shengxudong 于 2012-4-1 21:35 编辑

Sub 清空()
Range("i:i").Select

Selection.ClearContents
Range("a1").Activate
End Sub
Sub 查找月份()
Dim x As Integer
Dim yAs Integer
Dim yue As String
For x = 2 To 7
    For y = 2 To 8
       If Cells(x, y).Value > 0 Then
         yue = Cells(1, y).Value
       End If
    Next y
    Cells(x, y).Value = yue
Next x
End Sub
页: 1 [2] 3
查看完整版本: 已结束:抢答2(2012-4-1)