how to use the IF formula with a range of cells

G

Guest

I have a text in one cell (J2) and have to compare it with text in a range of
cells (B2:B999) to return an expression if true. I have tried using the IF
function e.g
IF(J2=B2:B28,"Ordered","Not Ordered"), but it doesn't appear to like working
with a range of cell, works fine if you I point it to a single cell. Any help
would be appreciated.
 
G

Guest

=IF(ISNA(VLOOKUP(J2,B:B,1,FALSE)),"Not Ordered","Ordered")

Vaya con Dios,
Chuck, CABGx3
 
G

Guest

if is to compare Cells with text try this
=IF(OR(EXACT(A1,H1:H9)),"Not ordered"," ordered")

"The formula in the example must be entered as an array formula (array
formula: A formula that performs multiple calculations on one or more sets of
values, and then returns either a single result or multiple results. Array
formulas are enclosed between braces { }, and are entered by pressing
CTRL+SHIFT+ENTER.). After copying the example to a blank worksheet, select
each formula cell individually. Press F2, and then press CTRL+SHIFT+ENTER. If
the formula is not entered as an array formula, the error #VALUE! is returned.

The formula above uses the following syntax:

=OR(EXACT(TestValue, CompareRange))

TestValue refers to a cell containing a user-entered value; CompareRange
refers to a list of text values to be compared against.

cc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top