VBA实例:高考分数投档指数分析(模块3.同步代码部分)

2021-03-29 15:25

阅读:638

标签:ext   重点   实例   pre   sheet   next   ng2   高考   部分   

Sub 重点大学同步代码() Dim I% Dim rng As range, rng1 As range, rng2 As range For Each rng In ThisWorkbook.Worksheets("重点大学明细").range("C2", ThisWorkbook.Worksheets("重点大学明细").[C2].End(xlDown)) For Each rng1 In ThisWorkbook.Worksheets("院校分专业入取线").range("f2", ThisWorkbook.Worksheets("院校分专业入取线").[f2].End(xlDown)) If rng = rng1 Then rng(1, 0) = rng1(1, 0) Exit For End If Next rng1 For Each rng2 In ThisWorkbook.Worksheets("985大学").range("C2", ThisWorkbook.Worksheets("985大学").[C2].End(xlDown)) If rng = rng2 Then rng(1, 3) = rng2(1, 2) Exit For End If Next rng2 Next rng End Sub
Sub 学校评级同步代码()
 Dim I%
 Dim rng As range, rng1 As range, rng2 As range
     For Each rng In ThisWorkbook.Worksheets("学校评级").range("C2", ThisWorkbook.Worksheets("学校评级").[C2].End(xlDown))
        For Each rng1 In ThisWorkbook.Worksheets("院校分专业入取线").range("f2", ThisWorkbook.Worksheets("院校分专业入取线").[f2].End(xlDown))
            If rng = rng1 Then
                 rng(1, 0) = rng1(1, 0)
                 Exit For
            End If
       Next rng1
    Next rng
End Sub

VBA实例:高考分数投档指数分析(模块3.同步代码部分)

标签:ext   重点   实例   pre   sheet   next   ng2   高考   部分   

原文地址:https://blog.51cto.com/12815848/2527924


评论


亲,登录后才可以留言!