Formula for mutually exclusive values

detriez

Board Regular
Joined
Sep 13, 2011
Messages
193
Office Version
  1. 365
Platform
  1. Windows
I have a sheet with 10 columns that I need to classify as follows.
Classifications are based on completeness of data.but I'm not sure that these will be mutually exclusive or how to write the formula.


If columns A-J are not blank, value = Gold

If columns A-G are not blank and either H, I or J are blank, value = Silver

If columns A-E are not blank and either F, G, H, I, J, are blank OR if A-E are not blank and E="US" F is not blank and either G, H, I, J are blank, value=Bronze

All the rest, value = None
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Unclear.

What do you mean by columns A-J are not blank?

A1:J1000 say are not blank? The entire range, ie the entire column?
Or do you mean the cells on the same row e.g. A1:J1 are not all blank?
 
Upvote 0
Hey,

Assuming you mean the entire column has at least 1 value in it then use this messy but workable formula (not sure about that last condition though with E="US" (?)

=IF(AND(COUNTA(A:A)>0,COUNTA(B:B)>0,COUNTA(C:C)>0,COUNTA(D:D)>0,COUNTA(E:E)>0,COUNTA(F:F)>0,COUNTA(G:G)>0,COUNTA(H:H)>0,COUNTA(I:I)>0,COUNTA(J:J)>0),"Gold",IF(AND(COUNTA(A:A)>0,COUNTA(B:B)>0,COUNTA(C:C)>0,COUNTA(D:D)>0,COUNTA(E:E)>0,COUNTA(F:F)>0,COUNTA(G:G)>0),"Silver",IF(AND(COUNTA(A:A)>0,COUNTA(B:B)>0,COUNTA(C:C)>0,COUNTA(D:D)>0,COUNTA(E:E)>0),"Bronze","None")))
 
Upvote 0
Or if you mean on one row try

=IF(COUNTA(A1:J1)=10,"Gold",IF(AND(COUNTA(A1:G1)=7,COUNTA(H1:J1)<>3),"Silver",IF(OR(AND(COUNTA(A1:E1)=5,COUNTA(F1:J1)<>5),AND(COUNTA(A1:E1)<>5,E1="US",F1<>"",COUNTA(G1:J1)<>4)),"Bronze","OTHER")))
 
Upvote 0
Just curious Special-K99,

Your 2nd condition "IF(AND(COUNTA(A1:G1)=7,COUNTA(H1:J1)<>3" when the first condition "IF(COUNTA(A1:J1)=10" surely the AND is not required here? Wouldn't it suffice to say IF(COUNTA(A1:G1)=7,"Silver" instead? As this condition is only read if the count of A1:J1 is not​ 10
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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