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

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

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

    隨筆-28  評(píng)論-51  文章-10  trackbacks-0
    這學(xué)期做助教,不過就忙了最近3天,統(tǒng)計(jì)學(xué)生成績(jī)的時(shí)候用Excel,發(fā)現(xiàn)把學(xué)生的分?jǐn)?shù)對(duì)應(yīng)到A,B, C D制很麻煩,如某某人考了98.5, 最終成績(jī)需要記成A+。幸好看過以前發(fā)在論壇上的教程,可以用VBA幫忙下(不過某有看過郭安定的高級(jí)教程,因?yàn)橐装。駝t以前根本不知道Excel 還可以這樣用。好,廢話不講了,把這個(gè)轉(zhuǎn)換成績(jī)的VBA(就是用在Excel里的一個(gè)程序代碼,應(yīng)該在Excel的高級(jí)教程里會(huì)講到)。 有興趣的可以學(xué)一下,其實(shí)看懂了蠻簡(jiǎn)單的^_^

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

     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 閱讀(630) 評(píng)論(0)  編輯  收藏 所屬分類: 其他

    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 国产青草亚洲香蕉精品久久| 亚洲精品动漫免费二区| 亚洲Av高清一区二区三区| 亚洲成AV人网址| 免费无码精品黄AV电影| 黄色短视频免费看| 亚洲中文字幕一二三四区| 亚洲国产成人久久精品动漫| 国产精品V亚洲精品V日韩精品 | 亚洲精品国产高清嫩草影院| 99国产精品永久免费视频| 秋霞人成在线观看免费视频| 疯狂做受xxxx高潮视频免费| 精品久久亚洲中文无码| 亚洲午夜未满十八勿入| 亚洲精品国产精品乱码不卡√ | 亚洲色无码国产精品网站可下载| 亚洲三级电影网址| 亚洲精品高清视频| 久久精品国产精品亚洲人人| 高清国语自产拍免费视频国产| 最近最新高清免费中文字幕| 久久青草91免费观看| 天堂在线免费观看| 一本岛v免费不卡一二三区| 污污免费在线观看| 国产亚洲精品美女久久久久| 亚洲a∨无码精品色午夜| 亚洲日本成本人观看| 亚洲经典千人经典日产| 亚洲小视频在线观看| 亚洲国产精品乱码一区二区| jlzzjlzz亚洲乱熟在线播放| 亚洲色欲久久久久综合网| 亚洲精品在线视频| 国产91精品一区二区麻豆亚洲 | wwwxxx亚洲| 亚洲一区在线视频观看| 亚洲日韩中文字幕天堂不卡| 亚洲另类自拍丝袜第1页| 亚洲图片中文字幕|