| 所在主题: | |
| 文件名: Book1.zip | |
| 资料下载链接地址: https://bbs.pinggu.org/a-2184415.html | |
本附件包括:
|
|
| 附件大小: | |
|
如图所示,程序是个每秒都会自动添加一列数据的记录的东西,一旦13列数字到了10万,那么把这些数字都归到1组,组数记录在14列,现在想在15列求每一组数据中心化后的数值,就是第10列每一个数除以它所在组(红圈和蓝圈)的标准差。我想每当程序刷新到每一组最后一个数据的时候(也就是第13列出现10万的时候),第15列就能算出我所有要的东西。 请求高手。。。本人想了几天实在没想懂 附上代码....写的很粗糙....希望高手们能看懂指引一下啊... Sub 记录() Dim a As Integer Dim sumvol As Integer Dim accum As Integer Dim g As Integer g = Cells(Rows.Count, 14).End(xlUp).Row + 1 a = Sheet1.Cells(Rows.Count, 6).End(xlUp).Row For i = 6 To 9 Sheet1.Cells(a, i).Offset(1, 0) = Sheet1.Cells(3, i).Value Next Sheet1.Cells(a + 1, 10) = Sheet1.Cells(a + 1, 6) - Sheet1.Cells(a, 6) Sheet1.Cells(a + 1, 11) = Sheet1.Cells(a + 1, 7) 'Sheet1.Cells(a, 7) If Sheet1.Cells(a + 1, 11).Value + Sheet1.Cells(a, 12).Value < 100000 Then Sheet1.Cells(a + 1, 12) = Sheet1.Cells(a, 12) + Sheet1.Cells(a + 1, 11) Sheet1.Cells(a + 1, 13) = Sheet1.Cells(a + 1, 12) Else Sheet1.Cells(a + 1, 12) = Sheet1.Cells(a, 12) + Sheet1.Cells(a + 1, 11) - 100000 Sheet1.Cells(a + 1, 13) = 100000 End If If Sheet1.Cells(a, 13) < 100000 Then If Sheet1.Cells(a, 14) = "" Then Sheet1.Cells(a + 1, 14) = 1 Else Sheet1.Cells(a + 1, 14) = Sheet1.Cells(a, 14) End If Else Sheet1.Cells(a + 1, 14) = Sheet1.Cells(a, 14) + 1 End If Application.OnTime Now + TimeValue("00:00:01"), "记录" End Sub |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明