Mode IF & Count IF excluding specific Value

apatheticrory

New Member
Joined
Jul 27, 2017
Messages
6
I am creating a sheet that counts the number of applications received from specific Nationalities excluding GBR (British).

I am currently using the below formula to return the nationality exc. GBR MODE for the year, however i'm really struggling to alter this to only count data where a specific month number is in Cell AY1:AY5000

Code:
=IF(ISERROR(INDEX(Applications!$P$2:$P$5000,MODE(IF((Applications!$P$2:$P$5000<>"")*ISNA(MATCH(Applications!$P$2:$P$5000,Mode!$K$1:$K$1,0)),MATCH(Applications!$P$2:$P$5000,Applications!$P$2:$P$5000,0)))))," No Data", INDEX(Applications!$P$2:$P$5000,MODE(IF((Applications!$P$2:$P$5000<>"")*ISNA(MATCH(Applications!$P$2:$P$5000,Mode!$K$1:$K$1,0)),MATCH(Applications!$P$2:$P$5000,Applications!$P$2:$P$5000,0)))))

Any help would be really appreciated, i've been trying for a while now :(
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Sorry,

So I have successfully managed to display the most frequent nationally, excluding "GBR", for submitted applications; this takes into account all the data on the "Applications" Sheet.

What i'm trying to do now is return the same but only for specific months, the number for which is located in AY2:AY5000 - So i'd like it to return the MODE of P2:P5000, excluding GBR, only if AY2:AY5000 = 1 or 2 etc..

P2:P5000 is the Nationality.

Cell K1 in the "Mode" sheet displays the value i would like to be omitted, in this case "GBR".

Code:
INDEX(Applications!P2:P5000,MODE(IF((Applications!P2:P5000<>"")*ISNA(MATCH(Applications!P2:P5000,Mode!K1:K1,0)),MATCH(Applications!P$2:P5000,Applications!P$2:P5000,0)))))

Hope this makes sense?

Thanks for your time.
 
Upvote 0
Hopefully this table will clarify what i'm trying to achieve. The blank cells are where i'm stuck.

YearQ1April
Busiest TeamA
Most Common NatB
Most Common Nat exc GBR
Most Common Nat (Alpha Team)
Most Common Nat exc GBR (Alpha Team)
Most Common Nat (Bravo Team)
Most Common Nat exc GBR (Bravo Team)
Most Common Nat (Charlie Team)
Most Common Nat exc GBR (Charlie Team)

<tbody>
</tbody>

The Cell in which i have entered A contains the following formula:

Code:
=INDEX(Data!D2:D20,MATCH(MAX(COUNTIF(Data!D2:D20,Data!D2:D20)),COUNTIF(Data!D2:D20,Data!D2:D20),0))

The cell in which i have entered B contains the same but with the Column changed to incorporate the Nationality not the Team.

The data on which this is produced is a simple sheet as follows:

DateQuarterMonthTeamNationality
01/01/201741AlphaGBR
01/04/201714CharlieUSA

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,665
Members
449,462
Latest member
Chislobog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top