使用聚合计算中位数

时间:2017-06-21 13:36:29

标签: excel excel-formula

如果有以下用于计算SMALL的函数:

=IFERROR(AGGREGATE(15; 6; Table5[Salary]/(Table5[Letter]="F") /(Table5[Level]=B2) /(Table5[[Title ]]=A2); 1); "-")

当第一个参数是15(SMALL)或14(Large)时,它完全正常。但是如果我尝试计算中位数(用12代替15),则返回错误值“ - ”。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

中位数不接受数组输入,在AGGREGATE中必须为{ "name": "phoenix", "version": "1.2.1", "description": "The official JavaScript client for the Phoenix web framework.", "license": "MIT", "main": "./priv/static/phoenix.js", "repository": { "type": "git", "url": "git://github.com/phoenixframework/phoenix.git" }, "author": "Chris McCord <chris@chrismccord.com> (http://www.phoenixframework.org)", "devDependencies": { "brunch": "~2.6.5", "mocha": "~2.4.4", "babel-brunch": "~6.0.0", "uglify-js-brunch": "~2.0.1" }, "files": ["README.md", "LICENSE.md", "package.json", "priv/static/phoenix.js"], "scripts": { "test": "./node_modules/.bin/mocha ./web/test/**/*.js --compilers js:babel-register" } } 或更高才能接受数组输入。

您需要使用MEDIAN(IF())作为数组公式:

14

作为数组公式,需要使用Ctrl-确认 退出编辑模式时按Shift- Enter而不是Enter。如果操作正确,Excel会将=IFERROR(MEDIAN(IF((Table5[Letter]="F")*(Table5[Level]=B2)*(Table5[[Title ]]=A2);Table5[Salary]));"-") 放在公式周围。

相关问题