简体   繁体   English

基于行和列值的Excel平均值

[英]Excel average based on row and column values

I would like to calculate the average (and other summary statistics) of algae counts based on the algal group (Column B) and the month (collection dates are in row 1). 我想根据藻类(B列)和月份(收集日期在第1行)来计算藻类计数的平均值(以及其他摘要统计信息)。 The first few columns and rows look like this: 前几列和每一行看起来像这样:

row B---------------------C-------------------D

Algal Group -------6/5/2000 ----------7/5/2000-----etc.

Cyanobacteria-------5---------------------60        
Bacillariophyta-------2---------------------40      
Xanthophyta-------[blank]---------------30      

I've tried using the standard AVERAGEIFS combined with the MONTH forumla, but I think the row of dates is throwing it off. 我曾尝试将标准的AVERAGEIFS与MONTH forumla结合使用,但我认为这一行的日期已将其淘汰。 I've also tried inserting a new row below the dates (ie, row 2) with the Month of the collection date in row 1, and referring to that column in an AVERAGEIFS. 我还尝试在日期(即第2行)下的第1行中的收集日期的月份插入新行,并在AVERAGEIFS中引用该列。 That didn't work either. 那也不起作用。 I've also tried entering it as an array formula. 我也尝试过将其作为数组公式输入。 The dates are C1:DW1, Algae Groups are B2:B246. 日期是C1:DW1,藻类组是B2:B246。 Any thoughts are much appreciated! 任何想法都非常感谢!

Use an array formula like this: 使用这样的数组公式:

=AVERAGE(IF((MONTH($C$1:$E$1)=H8)*($B$2:$B$4=H9)*($C$2:$E$4<>""),$C$2:$E$4))

Being an Array it needs to be confirmed with Ctrl-Shift-Enter. 作为数组,需要使用Ctrl-Shift-Enter确认。 If done correctly Excel will put {} around the formula. 如果正确完成,Excel会将{}放在公式周围。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel:基于多个列的多个选项的值对列的值求和 - Excel: sum values of a column based on multiple options' values of multiple columns 计算数组的列中的值的平均值? - calculating average of values in column of an array? 如何计算数组中每一行和每一列的平均值 - How to calculate the average of each row and column in array Excel - 返回数组中右三个值的平均值 - Excel - Return average of right three values in array 我如何根据其他数组的值在列中列出数组的值 - Excel VBA - Ho do I list values of an array in a column based on values from other arrays - Excel VBA 在第一列中查找重复项并根据第三列取平均值 - Find duplicates in first column and take average based on third column 根据列值搜索行,更改从输入表中的值找到的行的值 - Google Apps 脚本(表) - Search for Row based on Column Value, Change Values of Row Found from Values in Input sheet- Google Apps Script (Sheets) 得到平均(row,col)单元格给定的数组值作为权重? - get average (row, col) cell given array values as weights? Google表格:数组每行中最大值的平均值 - Google Sheets: Average of largest values in each row of an array 逐行写入excel文件,而不是逐列写入 - Write to excel file row by row, instead of column by column
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM