vba应用

Sub a()
Worksheets("教师").Range("ap4:ap300").Value = 0
Worksheets("教师").Range("as4:as300").Value = 0
Worksheets("二线").Range("an3:an300").Value = 0
Worksheets("二线").Range("aq3:aq300").Value = 0
Dim i As Integer
Worksheets("Sheet1").Cells(1, 1)="姓名"
Worksheets("Sheet1").Cells(1, 2)="耀华"
Worksheets("Sheet1").Cells(1, 3)="嘉诚"
Worksheets("Sheet1").Cells(1, 4)="合计"
For i = 2 To 300
    Worksheets("Sheet1").Cells(i, 1) = Worksheets("非义务耀华在编").Cells(i + 2, 2)
    Worksheets("Sheet1").Cells(i, 2) = Worksheets("非义务耀华在编").Cells(i + 2, 5)
Next

End Sub



Sub a()
Dim i As Integer
Dim j As Integer

For i = 2 To 289
    Worksheets("12").Cells(i, 11) = Application.WorksheetFunction.VLookup(Cells(i, 2), Worksheets("13-12").Range("A:D"), 2, 0)

On Error Resume Next

    
Next


End Sub

 

posted on 2016-05-18 22:28  shortail  阅读(217)  评论(0编辑  收藏  举报