码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2020-09-16 12:37:19      阅读:27      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!