ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compare a value to many other values (https://www.excelbanter.com/excel-discussion-misc-queries/201111-compare-value-many-other-values.html)

viktor

compare a value to many other values
 
I want to check if a certain value (cell) is equal to any of a number of
cells (N5:AQ32). If the value equals one or more of the cells i want it to
return "1", if not return "0".

Thanks in adwance.

Viktor

Mike H

compare a value to many other values
 
Try

=IF(COUNTIF(N5:AQ32,A1)0,1,0)

Mike

"Viktor" wrote:

I want to check if a certain value (cell) is equal to any of a number of
cells (N5:AQ32). If the value equals one or more of the cells i want it to
return "1", if not return "0".

Thanks in adwance.

Viktor


Dave Peterson

compare a value to many other values
 
another one:

=--(COUNTIF(N5:AQ32,A1)0)

The -- stuff changes True to 1 and false to 0.

Viktor wrote:

I want to check if a certain value (cell) is equal to any of a number of
cells (N5:AQ32). If the value equals one or more of the cells i want it to
return "1", if not return "0".

Thanks in adwance.

Viktor


--

Dave Peterson


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

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