ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I make this formula work =if(a1=(b10:b20),"good","bad"). (https://www.excelbanter.com/excel-worksheet-functions/7326-how-do-i-make-formula-work-%3Dif-a1%3D-b10-b20-%22good%22-%22bad%22.html)

AK

How do I make this formula work =if(a1=(b10:b20),"good","bad").
 
I need to check if the number in cell a1 equals one of the numbers in cells
b10 though b20.

tjtjjtjt

AK,

This should do it:
=IF(COUNTIF(B1:B10,A1)0,"good","bad")

tj

"AK" wrote:

I need to check if the number in cell a1 equals one of the numbers in cells
b10 though b20.


Andy Brown

I need to check if the number in cell a1 equals one of the numbers in
cells
b10 though b20.


=IF(ISERROR(MATCH(A1,$B$10:$B$20,0)),"Bad","Good")

Rgds,
Andy




All times are GMT +1. The time now is 11:49 PM.

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