TRUE or FALSE Cell Content

rhmkrmi

Active Member
Joined
Aug 17, 2012
Messages
341
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a column where cells are populated with text TRUE or FALSE.
What formula can I use to check if the cell text content in TRUE or FALSE?
I tried IF(A1="TRUE","TRUE",IF(A1="FALSE","FALSE")) but it returns FALSE even when the cell text content is TRUE.

Thanks.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Try
Excel Formula:
=IF(A1 = "TRUE", TRUE, FALSE)
 
Upvote 0
What exactly do you have in A1?

If your formula is failing, it means that the formula =A1="True" would return the boolean FALSE. This could be the case if A1 contains "TRUE", for example, rather than the text value 'TRUE

AB
1"TRUE" FALSE
2TRUETRUE
3TRUETRUE
Sheet1
Cell Formulas
RangeFormula
A2A2=IF(1=1,"TRUE","FALSE")
B1:B3B1=A1="TRUE"


You'd be better off using boolean TRUE/FALSE throughout, rather than text values.
 
Upvote 0
What exactly do you have in A1?

If your formula is failing, it means that the formula =A1="True" would return the boolean FALSE. This could be the case if A1 contains "TRUE", for example, rather than the text value 'TRUE

AB
1"TRUE" FALSE
2TRUETRUE
3TRUETRUE
Sheet1
Cell Formulas
RangeFormula
A2A2=IF(1=1,"TRUE","FALSE")
B1:B3B1=A1="TRUE"


You'd be better off using boolean TRUE/FALSE throughout, rather than text values.
Thank you.

In cell A1 I have a free text value as TRUE without single or double quotes.

I have not entered these values.
The spreadsheet that I am using is a report output imported into Excel.
Column A has free text values in cells as either TRUE or FALSE.

Thanks again.
 
Upvote 0
If A1 contains TRUE or FALSE and you want to return TRUE or FALSE, why can't you just use =A1
 
Upvote 0
Here is a sample:

1712810334611.png


Thanks.
 
Upvote 0
The values are centred it looks like they're already Boolean and not text.

What happens when you do
Excel Formula:
=ISLOGICAL(A1)
 
Upvote 0
This will handle both Boolean and Text but it is hiding the problem which you are perpetuating by using TRUE and FALSE as output of the If statement.
Excel Formula:
= IF(A1&""="TRUE","TRUE",IF(A1&""="FALSE","FALSE","NA"))
As Cubist and Stephen have mentioned it is likely that the current value is Boolean which means you don't need the quotes.
It would be better to understand what you are wanting to achieve,
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,692
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top