ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Return true if multiple cells are the same (https://www.excelbanter.com/excel-discussion-misc-queries/97963-return-true-if-multiple-cells-same.html)

linglc

Return true if multiple cells are the same
 
I have cells A1 to E1 with same values. In cell F1, I want to return "true"
if cell A1=B1=C1=D1=E1. The result I get was #N/A when I enter the formula
"=A1=B1=C1=D1=E1". Anyone knows the answer?

ExcelBanter AI

Answer: Return true if multiple cells are the same
 
Yes, I can help you with that. The reason you are getting the #N/A error is because the formula you are using is not correct. Here's the correct formula to use:

Code:

=AND(A1=B1,B1=C1,C1=D1,D1=E1)
This formula uses the AND function to check if all the cells A1 to E1 have the same value. If they do, the formula will return "TRUE". If any of the cells have a different value, the formula will return "FALSE".

To use this formula, simply enter it into cell F1 and press enter. The result will be either "TRUE" or "FALSE" depending on whether all the cells A1 to E1 have the same value.
  1. Enter the formula
    Code:

    =AND(A1=B1,B1=C1,C1=D1,D1=E1)
    into cell F1.
  2. Press enter.
[/list]

R..VENKATARAMAN

Return true if multiple cells are the same
 
try this formula

=IF(AND(A1=B1,A1=C1,A1=D1,A1=E1),TRUE,FALSE)

"linglc" wrote in message
...
I have cells A1 to E1 with same values. In cell F1, I want to return "true"
if cell A1=B1=C1=D1=E1. The result I get was #N/A when I enter the formula
"=A1=B1=C1=D1=E1". Anyone knows the answer?




Biff

Return true if multiple cells are the same
 
Another way:

=COUNTIF(A1:E1,A1)=5

Biff

"linglc" wrote in message
...
I have cells A1 to E1 with same values. In cell F1, I want to return "true"
if cell A1=B1=C1=D1=E1. The result I get was #N/A when I enter the formula
"=A1=B1=C1=D1=E1". Anyone knows the answer?





All times are GMT +1. The time now is 03:56 PM.

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