Excel Formulas

%3CLINGO-SUB%20id%3D%22lingo-sub-2174531%22%20slang%3D%22en-US%22%3EExcel%20Formulas%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2174531%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20looking%20for%20some%20help%20with%20excel%20formulas.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20column%20D2%20I've%20got%20a%20drop%20down%20list%2C%20options%3A%20Yes%2C%20Partial%2C%20No%2C%20N%2FA.%3C%2FP%3E%3CP%3EIf%20I%20select%20Yes%20in%20D2%2C%20I%20want%20I2%20to%20show%202%3C%2FP%3E%3CP%3EIf%20I%20select%20Partial%20in%20D2%2C%20I%20want%20I2%20to%20show%201%3C%2FP%3E%3CP%3EIf%20I%20select%20No%20in%20D2%2C%20I%20want%20I2%20to%20show%200%3C%2FP%3E%3CP%3EIf%20I%20select%20N%2FA%20in%20D2%2C%20I%20want%20I2%20to%20show%20N%2FA.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20possible%3F%3C%2FP%3E%3CP%3ESo%20far%2C%20I%20managed%20to%20get%203%20options%20correctly%20by%20using%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(D2%3D%22Yes%22%2C%222%22%2CIF(D2%3D%22Partial%22%2C%221%22%2C%220%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20would%20be%20much%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMartyna%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2174531%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hello,

 

I'm looking for some help with excel formulas. 

In column D2 I've got a drop down list, options: Yes, Partial, No, N/A.

If I select Yes in D2, I want I2 to show 2

If I select Partial in D2, I want I2 to show 1

If I select No in D2, I want I2 to show 0

If I select N/A in D2, I want I2 to show N/A.

 

Is this possible?

So far, I managed to get 3 options correctly by using:

 

=IF(D2="Yes","2",IF(D2="Partial","1","0"))

 

Any help would be much appreciated.

 

Kind regards

 

Martyna

2 Replies

@MartynaCzerwinska123 Perhaps not the most straight-forward formula, but you could use:

 

=LOOKUP(D2,{"N/A","No","Partial","Yes"},{"N/A",0,1,2})

 

or

 

=IF(D2="Yes",2,IF(D2="Partial",1,IF(D2="No",0,"N/A")))

 

if you want to stay closer to your initial approach.

Thank you so much Riny! It works perfectly!