简体   繁体   中英

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.

I do have values stored as Good, V Good, Avg against the record.

在此处输入图像描述

Any excel formula for this to calculate rating out of 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.

=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. Therefore I don't understand your request for a "rating out of 5". However, you can use the same formula on a larger range, of 5 or more columns. Just change both range references to include more columns, like E2:G2 . The important thing is to change both to the same size of range.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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