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

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
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.

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Year[/TD]
[TD]Q1[/TD]
[TD]April[/TD]
[/TR]
[TR]
[TD]Busiest Team[/TD]
[TD]A[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat[/TD]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat exc GBR[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat (Alpha Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat exc GBR (Alpha Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat (Bravo Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat exc GBR (Bravo Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat (Charlie Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Most Common Nat exc GBR (Charlie Team)[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Quarter[/TD]
[TD]Month[/TD]
[TD]Team[/TD]
[TD]Nationality[/TD]
[/TR]
[TR]
[TD]01/01/2017[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD]Alpha[/TD]
[TD]GBR[/TD]
[/TR]
[TR]
[TD]01/04/2017[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]Charlie[/TD]
[TD]USA[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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