简体   繁体   English

Excel 计算平均评分的公式 5

[英]Excel Formula to calculate Average rating out of 5

I have a table of data where ratings are given as V good - 3, Good - 2, Avg - 1 but if the value is NA I want to exclude that from Avg.我有一个数据表,其中评级为 V 好 - 3、好 - 2、平均 - 1,但如果值为 NA,我想将其从平均中排除。

I do have values stored as Good, V Good, Avg against the record.我确实将值存储为 Good、V Good、Avg 与记录相对应。

在此处输入图像描述

Any excel formula for this to calculate rating out of 5.任何 excel 公式用于计算 5 分中的评级。

Thanks in advance.提前致谢。

Please try this formula.请试试这个公式。 It's designed for entry in a cell in row 2 from where it can be copied down.它设计用于在第 2 行的单元格中输入,从该单元格可以复制下来。

=IFERROR(SUMPRODUCT((COUNTIF(C2:E2,{"V Good","Good","Avg"})*{3,2,1}))/SUMPRODUCT((COUNTIF(C2:E2,{"V Good","Good","Avg"}))), "NA")

There are only 3 columns in your example.您的示例中只有 3 列。 Therefore I don't understand your request for a "rating out of 5".因此,我不理解您要求“满分 5 分”的要求。 However, you can use the same formula on a larger range, of 5 or more columns.但是,您可以在 5 列或更多列的更大范围内使用相同的公式。 Just change both range references to include more columns, like E2:G2 .只需更改两个范围引用以包含更多列,例如E2:G2 The important thing is to change both to the same size of range.重要的是要将两者更改为相同的范围大小。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM