mercredi 20 novembre 2019

Data Validation Default Value

This is how it should work. In Data validation I have two values.

In C-4 if you enter "Employee" you can choose Discount Code. But if you enter "Customer" the default Discount code is DC25.

However, I always get this error.

OR expects boolean values. But '25 DISCOUNT' is a text and cannot be coerced to a boolean.

Can someone help me, please? This is the formula I'm using

=IF(OR(TRIM(C4)=("Customer"),"25 DISCOUNT"),IF(TRIM(C4)=LEFT("Employee"), VLOOKUP(TRIM(G6),J:K,2,false),  ""))

MY SAMPLE SPREADSHEET

Data validation

*---*----*---*----*----*--*
| DISCOUNT |              |
| CODE:    |              |
*---*--------*----*----*--*
| DC70     | 70 % DISCOUNT|
| DC25     | 25 % DISCOUNT|
*---*----*--------*----*--*

Aucun commentaire:

Enregistrer un commentaire