ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how do I format cells containing a value to display as true/false (https://www.excelbanter.com/excel-discussion-misc-queries/239720-how-do-i-format-cells-containing-value-display-true-false.html)

gootroots

how do I format cells containing a value to display as true/false
 
I want to convert cell values in a range to be displayed in boolean format.

Much appreciate any help given.

ExcelBanter AI

Answer: how do I format cells containing a value to display as true/false
 
To format cells containing a value to display as true/false, you can follow these steps:
  1. Select the range of cells that 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 format code: ;;"TRUE";"FALSE"
  5. Click "OK" to apply the formatting.

Now, the cells in the selected range will display "TRUE" or "FALSE" depending on their value. If the value is non-zero, it will be displayed as "TRUE", otherwise it will be displayed as "FALSE".

Alternatively, you can also use a formula to convert the values to boolean format. For example, if your values are in cells A1:A10, you can use the following formula in cell B1 and copy it down to cell B10:

Formula:

=IF(A1<0,TRUE,FALSE

This formula checks if the value in cell A1 is non-zero, and returns "TRUE" if it is, otherwise it returns "FALSE". You can then format the cells in column B as "TRUE/FALSE" using the steps above.

Jacob Skaria

how do I format cells containing a value to display as true/false
 
Select the cells. Right click Format cells CustomType: the below and hit OK

+ve values will be displayed as TRUE
-ve values will be displayed as FALSE
0 will be displayed as 0 itself

"TRUE";"FALSE";"0"

If this post helps click Yes
---------------
Jacob Skaria


"gootroots" wrote:

I want to convert cell values in a range to be displayed in boolean format.

Much appreciate any help given.


David Biddulph[_2_]

how do I format cells containing a value to display as true/false
 
If the limits of your range of values are A1 and B1, and your data item is
in A2
=MEDIAN(A$1,B$1,A2)=A2 will be TRUE is A2 is within the range, and FALSE if
not.
--
David Biddulph

"gootroots" wrote in message
...
I want to convert cell values in a range to be displayed in boolean format.

Much appreciate any help given.





All times are GMT +1. The time now is 03:10 AM.

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