<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    隨筆-28  評論-51  文章-10  trackbacks-0
    這學期做助教,不過就忙了最近3天,統計學生成績的時候用Excel,發現把學生的分數對應到A,B, C D制很麻煩,如某某人考了98.5, 最終成績需要記成A+。幸好看過以前發在論壇上的教程,可以用VBA幫忙下(不過某有看過郭安定的高級教程,因為要米啊),否則以前根本不知道Excel 還可以這樣用。好,廢話不講了,把這個轉換成績的VBA(就是用在Excel里的一個程序代碼,應該在Excel的高級教程里會講到)。 有興趣的可以學一下,其實看懂了蠻簡單的^_^

    具體要看效果的話,下載附件中的Excel文件,打開Excel文件,然后依次工具--》宏--》visual basic 宏編輯器, 把這段代碼copy進去后,點擊菜單欄下面的綠色的向右的三角形運行,到Excel查看,就可以看到效果啦, good  luck!
    http://www.tkk7.com/Files/fullfocus/VBA.rar
    參考文檔,使用的關鍵語句

     1 Sub GenGPA()
     2 Dim l As Long
     3 Dim i As Long
     4 Dim aplus As Long
     5 Dim a As Long
     6 Dim asub As Long
     7 Dim bplus As Long
     8 Dim b As Long
     9 Dim bsub As Long
    10 
    11 Application.DisplayAlerts = True
    12 = ActiveSheet.Range("A65535").End(xlUp).Row 'initial
    13 aplus = 0
    14 = 0
    15 asub = 0
    16 bplus = 0
    17 = 0
    18 bsub = 0
    19 
    20 For i = 2 To l
    21 If Cells(i, 7).Value >= 96 Then
    22 Cells(i, 8).Value = "A+"
    23 aplus = aplus + 1 'count the aplus number of students
    24 End If
    25 If Cells(i, 7).Value >= 90 And Cells(i, 7).Value <= 95 Then
    26 Cells(i, 8).Value = "A"
    27 = a + 1
    28 End If
    29 If Cells(i, 7).Value >= 85 And Cells(i, 7).Value < 90 Then
    30 Cells(i, 8).Value = "A-"
    31 asub = asub + 1
    32 End If
    33 If Cells(i, 7).Value >= 80 And Cells(i, 7).Value < 85 Then
    34 Cells(i, 8).Value = "B+"
    35 bplus = bplus + 1
    36 End If
    37 If Cells(i, 7).Value >= 75 And Cells(i, 7).Value < 80 Then
    38 Cells(i, 8).Value = "B"
    39 = b + 1
    40 End If
    41 If Cells(i, 7).Value >= 70 And Cells(i, 7).Value < 75 Then
    42 Cells(i, 8).Value = "B-"
    43 bsub = bsub + 1
    44 End If
    45 Next
    46 
    47 Cells(29).Value = "A+"
    48 Cells(210).Value = aplus
    49 Cells(39).Value = "A"
    50 Cells(310).Value = a
    51 Cells(49).Value = "A-"
    52 Cells(410).Value = asub
    53 Cells(59).Value = "B+"
    54 Cells(510).Value = bplus
    55 Cells(69).Value = "B"
    56 Cells(610).Value = b
    57 Cells(79).Value = "B-"
    58 Cells(710).Value = bsub
    59 
    60 
    61 End Sub
    62 
    63 



    posted on 2008-06-29 22:03 fullfocus 閱讀(620) 評論(0)  編輯  收藏 所屬分類: 其他

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 国产精品永久免费| 一级特黄a大片免费| 国产成人精品日本亚洲18图| 亚洲成人黄色网址| 久久综合亚洲色hezyo| yellow视频免费在线观看| 午夜亚洲国产成人不卡在线| 亚洲成Av人片乱码色午夜| 亚洲午夜久久久精品电影院| 国产精品亚洲天堂| 免费91麻豆精品国产自产在线观看| 国产电影午夜成年免费视频| 色吊丝最新永久免费观看网站| 中文字幕亚洲不卡在线亚瑟| 亚洲电影唐人社一区二区| 成人午夜影视全部免费看| 国产成人无码免费看视频软件| 亚洲乱码国产一区网址| 精品日韩亚洲AV无码一区二区三区| 亚洲av日韩aⅴ无码色老头| 免费午夜爽爽爽WWW视频十八禁| 4444亚洲国产成人精品| 中文字幕一区二区免费| 四虎在线免费播放| 久久亚洲AV无码精品色午夜麻豆| 我的小后妈韩剧在线看免费高清版 | 亚洲日本一区二区三区在线不卡| 亚洲黄色激情视频| 免费国产在线观看老王影院| 男女拍拍拍免费视频网站| 日本免费一二区在线电影| 亚洲卡一卡2卡三卡4麻豆| 日本特黄特黄刺激大片免费| 中国人免费观看高清在线观看二区| 日本免费电影一区| 成全视频高清免费观看电视剧| 国产AV无码专区亚洲AV漫画 | 亚洲日本va在线观看| 亚洲AV之男人的天堂| 免费精品视频在线| 亚洲国产成人爱av在线播放|