Hi
Any ideas how I can get the second most commonly occurring text value based on an if. The data I have is as follows:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Class[/TD]
[TD]Teacher[/TD]
[TD]Subject[/TD]
[/TR]
[TR]
[TD]10x/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]11x/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]11z/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L10/Ar[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L3/Ar[/TD]
[TD]EBE[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L8/Ar[/TD]
[TD]EBE[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]10y/Ci1[/TD]
[TD]RAM[/TD]
[TD]Citizenship[/TD]
[/TR]
[TR]
[TD]11x/Ci1[/TD]
[TD]RAM[/TD]
[TD]Citizenship[/TD]
[/TR]
[TR]
[TD]10w/Ci1[/TD]
[TD]SAH[/TD]
[TD]Citizenship[/TD]
[/TR]
</tbody>[/TABLE]
I have named the ranges so column A is Cls, Column B is Teach and Column C is Sub. The formula needs to go into another sheet?
To get the most common entry I have used the formula: {=INDEX(Sheet6!$B$2:$B$431,MODE(IF(Sheet6!$C$2:$C$431=Sheet4!$A3,MATCH(Sheet6!$B$2:$B$431,Sheet6!$B$2:$B$431,0))))}
I now need the second most common then the third etc.
I need to know the most occurring value based on subject so for Art my first common value would be AOW then EBE and for Citizenship the most common value would be RAM then SAH.
Any help would be really appreciated.
Thanks
Any ideas how I can get the second most commonly occurring text value based on an if. The data I have is as follows:
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]Class[/TD]
[TD]Teacher[/TD]
[TD]Subject[/TD]
[/TR]
[TR]
[TD]10x/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]11x/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]11z/Ar1[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L10/Ar[/TD]
[TD]AOW[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L3/Ar[/TD]
[TD]EBE[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]7L8/Ar[/TD]
[TD]EBE[/TD]
[TD]Art[/TD]
[/TR]
[TR]
[TD]10y/Ci1[/TD]
[TD]RAM[/TD]
[TD]Citizenship[/TD]
[/TR]
[TR]
[TD]11x/Ci1[/TD]
[TD]RAM[/TD]
[TD]Citizenship[/TD]
[/TR]
[TR]
[TD]10w/Ci1[/TD]
[TD]SAH[/TD]
[TD]Citizenship[/TD]
[/TR]
</tbody>[/TABLE]
I have named the ranges so column A is Cls, Column B is Teach and Column C is Sub. The formula needs to go into another sheet?
To get the most common entry I have used the formula: {=INDEX(Sheet6!$B$2:$B$431,MODE(IF(Sheet6!$C$2:$C$431=Sheet4!$A3,MATCH(Sheet6!$B$2:$B$431,Sheet6!$B$2:$B$431,0))))}
I now need the second most common then the third etc.
I need to know the most occurring value based on subject so for Art my first common value would be AOW then EBE and for Citizenship the most common value would be RAM then SAH.
Any help would be really appreciated.
Thanks
Last edited: