How to calculate average rating in excel with excluding blank cells? - excel

How to calculate average rating in excel with excluding blank cells?
In other way
if cells is empty --> not calculate rating
if 0 or greater than 0 to 5 --> calculate rating
then calculate average ratings.

Do you mean that your range includes values of less than 0 and/or larger than 5 and empty, but you only want to calculate value from 0 to 5?
I think you'd better use pair of SUMIFS and COUNTIFS, with set of your conditions (>=0, <=5, not blank...).
For example, assumed your value range B1:B6:
=SUMIFS(B1:B6,B1:B6,">=0",B1:B6,"<=5")/COUNTIFS(B1:B6,">=0",B1:B6,"<=5")
This give out result of average of 2.5
And please note that COUNTIFS or AVERAGE... they do not count empty cells by default.

Related

Excel - How to Rank from 1 to 100 Based on Values in More than 100 Cells

I am trying to figure out how to assign a rank from 1 to 100 in a column that has over 200 cells. I need an Excel formula that will keep the correct 1 to 100 rank even when the order of rows is changed. The way I manually calculate the rank is shown in the picture below:
=RANK.EQ and =RANK.AVG rank cells from 1 to however many cells are included in the reference, but I need a 1 to 100 rank.
I have tried using =IF(MAX($K:$K)=K3,100,M2-(100/COUNT($K:$K))) but because M2 is based on a cell rather than the next descending sequential number in column K, when I change the order of the rows, the rank becomes inacurrate.
Can you just use rank.eq or rank.avg and normalise the result to a range of 1-100?
=99*(RANK.AVG(A2,A:A,1)-1)/(COUNT(A:A)-1)+1

Finding average but with a maximum value per cell in excel

I am trying to find the average of a range of cells that fall between a predefined/criteria range (i.e. 0-2) but treating the end of the range (2 - in this example) as the maximum amount to be used in calculating the average over the range of cells in excel.
Here is an example of the data I am interested finding the average for:
COST
2
3
5
7
If finding the average using the range of 0-2, it should be 2, as you'd be treating anything with the cost of 2+ as 2. So, the total is 2+2+2+2=8 and there are 4 cells so the average would be 2.
Another example would find the average using the range of 0-3, the average would be 2.75, as the first value in the above table falls between the criteria range and the rest match or fall outside the high end of of range so they are assigned the maximum of 3. So, the total is 2+3+3+3=11 and there are 4 cells so the average would be 2.75.
You can try:
=SUM(IF(A2:A5>=C2,C2,A2:A5))/COUNT(A2:A5)
in pre-O365 it must be entered as array formula with Ctrl+Shift+Enter

Excel - function to find the highest sum in a table using each row and column only once

I've got a table in excel with 10 rows and 10 columns.
The table contains 100 different values between 1 and 3.
I want to find the highest sum of 10 values using only 1 value from each row and 1 from each column.
Do u guys know a function that finds the highest sum? - I've tried to do i manually, but there are to many combinations!
Hope it makes sense.
Thanks in advance:)
My solution builds on what I wrote in the comment, i.e. you first take the maximum value in the 10x10 array, then the maximum in the 9x9 array (excluding the row/column of the first maximum), etc. My solution tries not to do everything in one formula, but I add a few helper columns, and a bit more helper rows (it is fast and dirty, but it works and is easily audited/understandable). You always can do this on a separate worksheet which you could hide if needed.
The screenshot above goes from cell A1 till Y31.
The key formulas:
3.55 is the result of =MAX(B2:K11)
The first gray cell is =IFNA(MATCH($M12;B2:B11;0);""), and you drag this 9 cells to the left. This tries to find a match with the max result in each column of the table;
The 10 left of the 3.55 is =MATCH(TRUE;INDEX(ISNUMBER(P12:Y12);0);0) , and gives the column number of the max value.
The 2 next to the 10 is =INDEX(P12:Y12;N12) and gives the row number of the max value.
The 1 in cell B12 is =IF(OR(B$1=$N12;$A12=$O12);0;1), and creates a 10x10 matrix with a row and column with zeroes where the previous max value was found.
Then you multiply this with the preceding matrix and create a new 10x10 matrix below (enter {=B2:K11*B12:K21} array formula (ctrl+shift+enter) in B22-K31
You then copy/paste rows 12 till 31 9 times below
The 23.02 is the total sum =SUM($M$12:$M$211) from all 10 maximum values and is the result you are looking for. The 10 is just a check with =COUNT($M$12:$M$211)

How to achieve equal Sum Values horizontally and vertically in Excel

I'm working on this for a week now and still could not get the result I want. What I want is to have an equal result between the horizontal total and vertical total when summing up every columns in excel. Please consider this worksheet.
Every TSalary values in each row is equal to each values in its row in Gross Pay Columns. The same thing also in TDeductions with the columns in Deductions. However, after summing up each row and getting its overall total in AD13 & AE13, I am not getting the same value with the total when summing up every columns in gross pay and deductions.
In column AE you seem to have rounded each value to the nearer cent. In cell N13 you have summed the unrounded values.
The 4 half-cents (in column N) that have thus been rounded to a full cent cause your total to be 2 cents higher than the total of the unrounded amounts.
You need to be consistent when applying roundings if you wish your totals to be consistent.

PercentileIF Excel (or rangeif)

A B
1 5
2 10
2 15
3 20
I want to calculate percentile for a column of values B if A is equal say 2. That's I want to get range of B2,B3 and calculate percentile of this.
So basically the question is: how do I select range in one column with the checking with another column?
I.e. it works perfectly with SumIf and CountIf, I just need the same with PercentileIf. Thx!
This will give you the 25th percentile of A1:A6 for all cells where the value in B1:B6 equals 2:
=PERCENTILE.INC(IF(B1:B6=2,A1:A6,""),0.25)
It's an array formula and must be entered with Ctrl-Shift-Enter.

Resources