Allow only Booleans in a cell
Solved
mat1391
Posted messages
12
Status
Membre
-
mat1391 Posted messages 12 Status Membre -
mat1391 Posted messages 12 Status Membre -
Hello,
I would like to allow only Boolean values (TRUE/FALSE or... depending on the language used) in certain cells of my Excel sheet.
To do this, I thought of allowing only TRUE and FALSE via a list in data validation.
The problem is that if we switch to the English version of Excel, it no longer works, because Booleans are then recognized as TRUE and FALSE, and no longer as VRAI and FAUX, which are the only values allowed in my case, recognized only as simple strings. And vice versa.
Is there a method to allow only Booleans in an Excel cell that is independent of the language used?
I am using Excel 2016.
Thank you in advance.
Sincerely,
M. L.
I would like to allow only Boolean values (TRUE/FALSE or... depending on the language used) in certain cells of my Excel sheet.
To do this, I thought of allowing only TRUE and FALSE via a list in data validation.
The problem is that if we switch to the English version of Excel, it no longer works, because Booleans are then recognized as TRUE and FALSE, and no longer as VRAI and FAUX, which are the only values allowed in my case, recognized only as simple strings. And vice versa.
Is there a method to allow only Booleans in an Excel cell that is independent of the language used?
I am using Excel 2016.
Thank you in advance.
Sincerely,
M. L.
2 réponses
Hello,
I see 3 solutions:
1 - it should be solvable with a macro
2 - if you go through an intermediate column where you indicate a number, you can end up with TRUE/FALSE (e.g. in A2:1, in B2:=(A2=1) => in B2 you will have a boolean)
3 - starting from the observation that formulas allow translation, you can create your booleans independently of the language in a dedicated tab (e.g. by adding in B3:=(A2=0)) and use a validation list referencing the two booleans
Cheers
I see 3 solutions:
1 - it should be solvable with a macro
2 - if you go through an intermediate column where you indicate a number, you can end up with TRUE/FALSE (e.g. in A2:1, in B2:=(A2=1) => in B2 you will have a boolean)
3 - starting from the observation that formulas allow translation, you can create your booleans independently of the language in a dedicated tab (e.g. by adding in B3:=(A2=0)) and use a validation list referencing the two booleans
Cheers