ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   create formula to compare cell 1 with a range of cell (https://www.excelbanter.com/excel-programming/349760-create-formula-compare-cell-1-range-cell.html)

KKXC

create formula to compare cell 1 with a range of cell
 
I am trying to create a formula that compares Cell A2 to cell Range B2:B25,
so that if A2=B2:B25, it returns true, else it returns false and copy the
formula all the way way down in Column A. Currently I am using the IF
function. But it doesn't really work the way I want. It's only doing a cell
by cell comparison. I am putting the formula in Cell C2, at this point it is
check to see if Cell A2=B2, if it matches then it returns true. In Cell C3,
it returns true if Cell A3=B3. But I want to check if A3=A2, A3=A3, A3=A4
etc. Any ideas?

Thanks.

Gary''s Student

create formula to compare cell 1 with a range of cell
 
Try:

Countif(B2:B25,A2)0
--
Gary''s Student


"KKXC" wrote:

I am trying to create a formula that compares Cell A2 to cell Range B2:B25,
so that if A2=B2:B25, it returns true, else it returns false and copy the
formula all the way way down in Column A. Currently I am using the IF
function. But it doesn't really work the way I want. It's only doing a cell
by cell comparison. I am putting the formula in Cell C2, at this point it is
check to see if Cell A2=B2, if it matches then it returns true. In Cell C3,
it returns true if Cell A3=B3. But I want to check if A3=A2, A3=A3, A3=A4
etc. Any ideas?

Thanks.


[email protected][_2_]

create formula to compare cell 1 with a range of cell
 
I also like to do
=if(or(a2=b2:b25),"Found,"Not Found") then enter it as an array formula
(press shift enter at the end). I guess you could this or the above
formula depending on your exact use.

-Andrew V. Romero



All times are GMT +1. The time now is 05:02 AM.

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