Excel Median适用于多种条件

编程入门 行业动态 更新时间:2024-10-13 06:21:11
本文介绍了Excel Median适用于多种条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

基本上在excel中,我想要一张表格,如右下图所示(我的数据规模比给定的示例大得多),该表格具有每个科目的每个条件(例如TADA, TADP,TPDA,TPDP).理想情况下,我将使用数据透视表,但是excel不会在数据透视表中执行中位数"操作.我想知道是否有一个公式可以节省我必须手动进行计算并计算出中位数的问题,我已经尝试了一些(沿着"median(if etc.")行,但是我在excel中的编码知识是非常贫穷.有没有很短的方法做到这一点?

Basically in excel I want a table, like the one given below on the right (the scale of my data is a lot bigger than the example given),that has the median for each subject, for each condition (e.g. TADA, TADP, TPDA, TPDP). Ideally, I would use a pivot table, however, excel does not do 'median' in a pivot table. I was wondering if there was a formula I could to save me having to go through manually and working out the median, i've tried a few (along to lines of "median(if etc.." but my coding knowledge in excel is very poor. Is there a short way to do this?

Data Table Subject RT condition Subject TADA TADP TPDA TPDP 1 23 TADA 1 1 54 TPDA 2 1 65 TADA 3 1 67 TPDP 1 76 TADA 2 72 TPDA 2 87 TADA 2 12 TPDP 2 45 TADP 2 32 TPDP 2 87 TADA 3 98 TPDA 3 12 TADA 3 53 TPDA 3 78 TADP 3 98 TPDP

推荐答案

假定A2:C100中的数据,然后在F1中带有标题的结果表以及E2中向下带有行标签的结果表,可以在F2中使用这样的数组公式

Assuming data in A2:C100 and then your results table with headers in F1 across and row labels in E2 down you can use an array formula like this in F2

=MEDIAN(IF($A$2:$A$100=$E2,IF($C$2:$C$100=F$1,$B$2:$B$100)))

已通过 CTRL + SHIFT + ENTER 确认,并向下复制

confirmed with CTRL+SHIFT+ENTER and copied across and down

根据需要扩展数据范围

更多推荐

Excel Median适用于多种条件

本文发布于:2023-10-26 17:42:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1530876.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:适用于   多种   条件   Excel   Median

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!