Nested if not blank formula

detriez

Board Regular
Joined
Sep 13, 2011
Messages
193
Office Version
  1. 365
Platform
  1. Windows
I can seem to get the formula syntax to get this right

Code:
IF (A1 <>"" and B1<>"" and C1<>"") Then "Bronze"
IF (A1 <>"" and B1<>"" and C1<>"" and D1<>"" and E1<>"") Then "Silver"
IF (A1 <>"" and B1<>"" and C1<>"" and D1<>"" and E1<>"" and F1<>"" and G1<>"") Then "Gold"
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
See if this works for you:

=IFERROR(VLOOKUP(COUNTA(A1:G1),{3,"Bronze";5,"Silver";7,"Gold"},2,0),"")

This assumes that the cells will be filled across in order to determine the outcome.
 
Last edited:
Upvote 0
Thanks Scott,
This is a Data Scorecard so I need the specific columns to calculate the value (Bronze, Silver, Gold)

I got the first part (Bronze) of this to work but not the second (Silver)

Code:
=IF(AND([@[First Name]]<>"",[@[Last Name]]<>"",[@Email]<>"",[@[Company / Account]]<>"",[@Country]<>""),"Bronze",(IF(AND([@[First Name]]<>"",[@[Last Name]]<>"",[@Email]<>"",[@[Company / Account]]<>"",[@Country]<>"",[@Title]<>"",[@[State/Province]]<>"",[@[Job Classification]] <>""),"Silver")))
 
Upvote 0
If it is correct to say that if columns D thru G are empty then "Bronze", then if only F&G are empty then "Silver" else "Gold" then give this a try:
=if(D1&E2&F2&G2="","Bronze",if(F2&G2="","Silver","Gold"))
 
Upvote 0
If it is correct to say that if columns D thru G are empty then "Bronze", then if only F&G are empty then "Silver" else "Gold" then give this a try:
=if(D1&E2&F2&G2="","Bronze",if(F2&G2="","Silver","Gold"))

I think your D1 should be D2, but that's where I was going with my formula and the op said it was incorrect.

Perhaps:
=IF(AND(A1="",B1="",C1=""),"Bronze",IF(AND(A1="",B1="",C1="",D1="",E1=""),"SILVER",IF(AND(A1="",B1="",C1="",D1="",E1="",F1="",G1=""),"GOLD","")))
 
Last edited:
Upvote 0
You're not getting silver because you are checking the bronze fields again and finding some populated.

I gather from what you are saying that if you have any basic data (name/email/country...) then the row is at 'bronze' level
then if you have title/postal/job class the row is brought up to 'silver' and if there is any other data then 'gold'
If that is so, my suggestion is to check if all the 'gold' and 'silver' fields are empty then label 'bronze'; else check if gold fields are empty if so, this row is 'silver', all the rest are 'gold'
=if(D1&E1&F1&G1="","Bronze", if(F1&G1="","Silver", "Gold"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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