Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 1952|回复: 1

求助

[复制链接]
发表于 2019-2-15 11:47 | 显示全部楼层 |阅读模式
For i = 6 To 16
Cells(i, 2).Value = Application.WorksheetFunction.Sum(Sheets(i - 5).Range("F:F")) / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("F:F"), "<>") - 1)

Cells(i, 3).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("F:F"), ">=81") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("F:F"), "<>") - 1)

Cells(i, 4).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("F:F"), ">=78") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("F:F"), "<>") - 1)

Cells(i, 5) = Application.WorksheetFunction.Sum(Sheets(i - 5).Range("I:I")) / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("I:I"), "<>") - 1)

Cells(i, 6).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("I:I"), ">=82") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("I:I"), "<>") - 1)

Cells(i, 7).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("I:I"), ">=71") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("I:I"), "<>") - 1)

Cells(i, 8) = Application.WorksheetFunction.Sum(Sheets(i - 5).Range("L:L")) / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("L:L"), "<>") - 1)

Cells(i, 9).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("L:L"), ">=68") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("L:L"), "<>") - 1)

Cells(i, 10).Value = Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("L:L"), ">=61") / (Application.WorksheetFunction.CountIf(Sheets(i - 5).Range("L:L"), "<>") - 1)
Next
End Sub怎么把红色的数字改成某个单元格的值,比如cells(4,3).value,为什么数据出来是错的呢。。什么原因··help


excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
 楼主| 发表于 2019-2-15 14:25 | 显示全部楼层
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-4-26 01:59 , Processed in 0.222880 second(s), 8 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表