Excel Countif with the first count only - excel

I am using CountIf to find the number of duplicate values in a column. First I sorted the values in ascending order. Then I apply =COUNTIF(B:B;B2) and dragged it till end. The Results are as:
However, I don't want the values multiple times in the column C. Just need it for one time. Also is it possible without sorting the column B in ascending order?

Try this,
=if(countif(b$2:b2, b2)=1, countif(b:b, b2), text(,))
Fill down. The data does not require sorting.

Related

Excel formula to get the lowest n values from a range

I have some values in a column which are not necesarily sorted. Then I want to find the average of the lowest n values from the column with the values.
So let's take the example above. Say I need to average n=3 lowest values from the column above with values ranging from A1 to A10. The result will be the average of 1 (taken from A1), 2 (taken from A6) and 3 (taken from A2). I am thinking of something like AVERAGE(LOWEST_N(A1:A10, 3)) but I'm not sure it can be as simple as that.
Note: I can't sort the values on that specific column. I also do not wish to manually move the values to another column and sort them there, because I want to do this many multiple times and I need to automate the process.
You can use an array formula, using ctrl, shift and enter to confirm.
=AVERAGE(SMALL(A1:A10,ROW(1:3)))
Try this: =AVERAGEIF(A1:A10, "<4")

Excel: Sort column by specific names, than add the sum of the sorted items to separated cell

I have a column where I am going to add 3 specific strings ("zero","one","two").
These items will be sorted by default. I want a separated cell for the "zero" to search how many "zero" are there in the column and calculate the sum of them.
The problem is that every time when I use this document, the amount of "zero"-es will be different.
As far I understood your question is that you have a column with Multi names (Zero, One and Two) with a corresponding value cell and you want add the values of all the Zeros. Well as by this, the Sumif() function will help you good. See the picture at Following. see in the formula bar
and use Countif() to count the Zeros in the Column.

Break Ranking Ties with multiple Criteria

I'm trying to rank on multiple criteria values and window but do not want ties within ranks.
The formula i have satisfies the multiple criteria but not tie breaking.
=COUNTIF($H$5:$H$105412<"&H89)+COUNTIFS($H$5:$H$105412,H89,$E$5:$E$105412,"<"&E89)+1
I'd like for the highlighted values to be unique and break ties.
Thanks for your help!
this worked for me. it ranks the value against the range while considering the condition of windows as a criteria and also break ties when a duplicate occurs within the same condition or window
=RANK(E5,INDEX(E$5:E$1000,MATCH($H5,$H$5:$H$1000,0)):INDEX(E$5:E$1000,MATCH($H5,$H$5:$H$1000,0)+COUNTIF($H$5:$H$1000,$H5)-1),1)+COUNTIFS($H$5:$H5,$H5,$E$5:$E5,$E5)-1
Add one more column beside it, say column J and write this formula in Cell
J6=COUNTIFS($H$5:$H6,$H6,$E$5:$E6,$E6,$I$5:$I6,$I6)
Now drag this formula down till the end of your sheet.
This will record the instances in which the combination of ranks occur in ascending order.
Just filter out all values where the value in column J is 1. This will be the single non-duplicate entry.

Sorting formulas issue

I have a table which consists of names (1st column) avarageifs (2-6 columns) and average formulas (7 column).
Averageifs formula is taking the name to average values for each name:
=IFERROR(AVERAGEIFS(Grades!B:B,Grades!$A:$A,Rankings!$B14),"N/A")
"Total" average formula is:
=IFERROR(AVERAGE(C14:G14),0)
Then I am trying to sort it by "total" average, formulas are mixing up and referring to different rows.
But it should refer to the same row. What happens after sorting and how can I fix it?
Basically the references in the AVERAGEIFS formulae are getting swapped around and you don't want this to happen.
The easiest way round it would be to put the Totals column next to the Names column and just sort these two columns, leaving the other formulae in place.
If you don't want to do that, a fairly quick and dirty solution is to replace the AVERAGEIFS formulae with this so they always refer to the current row:-
=IFERROR(AVERAGEIFS(Grades!B:B,Grades!A:A,INDIRECT("Rankings!$B"&ROW())),"N/A")
See the discussion here

Ranking a column sourced from another column

I would like to display values in a column in ascending order without altering the order of the original column. For this I created a new column and populated it with the values from the original column. Original values change often, so I would like to use a formula and not "paste special". The setup is as follows:
How could I sensibly ranke the values in "Ranked RoR%" in ascending order? When I use sort they immediately revert to their original values, since they are sourced from the column RoR%. Thanks for any ideas!
Try this:
=SMALL(A:A,ROW(1:1))
This will display the smallest value in column A. If you drag down the formula it'll change ROW(1:1) to ROW(2:2) and so on displaying the N-th smallest value regardless of the order in column A. At the end you should have the values of column A in an ascending order.

Resources