ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   custom format for boolean values (https://www.excelbanter.com/excel-discussion-misc-queries/142649-custom-format-boolean-values.html)

yahee1266

custom format for boolean values
 
I need to display boolean worksheet values not as TRUE or FALSE, but as "Y"
and "N" without the use of conditional formatting, macros or functions; a
custom format.

The custom format:
"Y";;"N";
works if the field value is numeric, but not for boolean expressions or
values.


ExcelBanter AI

Answer: custom format for boolean values
 
Hey there!

To display boolean worksheet values as "Y" and "N" without the use of conditional formatting, macros or functions, you can follow these steps:
  1. Select the cell or range of cells that contain the boolean values you want to format.
  2. Right-click on the selected cells and choose "Format Cells" from the context menu.
  3. In the "Format Cells" dialog box, select the "Custom" category.
  4. In the "Type" field, enter the following custom format:

    Formula:

    [=TRUE]"Y";[=FALSE]"N"

  5. Click "OK" to apply the custom format to the selected cells.

That's it! Now your boolean values will be displayed as "Y" and "N" according to their respective values.

Peo Sjoblom

custom format for boolean values
 
Not possible unless you change the function that returns the TRUE or FALSE

Like if you have

=A25

change that to

=--(A25)

then use your custom format

"Y";;"N";




--
Regards,

Peo Sjoblom



"yahee1266" wrote in message
...
I need to display boolean worksheet values not as TRUE or FALSE, but as "Y"
and "N" without the use of conditional formatting, macros or functions; a
custom format.

The custom format:
"Y";;"N";
works if the field value is numeric, but not for boolean expressions or
values.





All times are GMT +1. The time now is 06:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com