Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel formula to search if all cells in a range read "True", if not, then show "False"

Using an excel formula to search if all cells in a range read "True", if not, then show "False"

For example:

A      B     C     D
True  True  True   True
True  True  FALSE  True

I want a formula to read this range and show that in row 2, the was a "False" and since there are no falses in row 1 I want it to show "true."

Can anyone help me with this?

like image 259
user3384215 Avatar asked Mar 05 '14 15:03

user3384215


People also ask

How do you check if all cells are true in Excel?

The AND function in Excel checks if every argument you put in it evaluates to TRUE. If everything evaluates to TRUE, then the function will return TRUE, otherwise, even if only one argument is FALSE, the function will return the value FALSE.

How do you do an IF formula with a range?

Step 1: Put the number you want to test in cell C6 (150). Step 2: Put the criteria in cells C8 and C9 (100 and 999). Step 3: Put the results if true or false in cells C11 and C12 (100 and 0). Step 4: Type the formula =IF(AND(C6>=C8,C6<=C9),C11,C12).

How do you write an IF THEN formula in Excel?

Use the IF function, one of the logical functions, to return one value if a condition is true and another value if it's false. For example: =IF(A2>B2,"Over Budget","OK") =IF(A2=B2,B4-A4,"")

Can you use Isblank for a range of cells?

We can use the ISBLANK coupled with conditional formatting. For example, suppose we want to highlight the blank cells in the range A2:F9, we select the range and use a conditional formatting rule with the following formula: =ISBLANK(A2:F9).


2 Answers

You can just AND the results together if they are stored as TRUE / FALSE values:

=AND(A1:D2)

Or if stored as text, use an array formula - enter the below and press Ctrl+Shift+Enter instead of Enter.

=AND(EXACT(A1:D2,"TRUE"))
like image 184
Simon D Avatar answered Oct 24 '22 00:10

Simon D


As it appears you have the values as text, and not the numeric True/False, then you can use either COUNTIF or SUMPRODUCT

=IF(SUMPRODUCT(--(A2:D2="False")),"False","True")
=IF(COUNTIF(A3:D3,"False*"),"False","True")
like image 29
SeanC Avatar answered Oct 24 '22 00:10

SeanC