中值代码出错 [英] Error with Median Code

查看:62
本文介绍了中值代码出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我有一个用来计算中位数的VBA代码:

Hi there,

I have a VBA code that I use to compute the median:

展开 | 选择 | Wrap | 行号

推荐答案

在我看来,您的功能正在完全按照您的要求去做。函数记录集上唯一的过滤器是''not not null''。


我认为你需要在你的函数中添加一个过滤字段,以便按你的意愿工作。

ie。
It looks to me like your function is doing exactly what you are asking it to do. The only filter on your function recordset is the ''is not null''.

I think you need to add a filter field to your function to make if work as you intend.
ie.
展开 | 选择 | Wrap | 行号


dsatino,


这听起来像是一个实用的解决方案。我试图让这个功能像AVG中的buit和这样的功能。


但是我是VBA的初学者。我如何将其添加到我的函数中?


您上一篇文章中的示例仅显示第一行代码。


谢谢。
dsatino,

That sounds like a practical solution. I am trying to have this function act like the buit in AVG and such functions.

However I''m a beginner to VBA. How would I add this to my function?

The example in your last post only shows the first line of code.

Thank you.


我想你会发现你的第二个帖子会被删除(复制帖子通常不赞成),这就是为什么我回应这个。


无论如何,只需将第一行改为我给你的,然后修改WHERE即可。函数中SQL字符串的语句。实际上,将第一行写成:

I think you''re going to find that your second posting of this question will get deleted (Duplicating posts is generally frowned upon) which is why I''m responding to this one.

In any case, just change the first line to what I gave you and then modify the "WHERE" statement of the SQL string in the function. Actually, make the first line this:

展开 | 选择 | Wrap | 行号


这篇关于中值代码出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆