Greater than and Less than

C

crackers

I have 9 columns of data in a worksheet that varies all the time.
I have written a formula to retrieve certain lines of the data as
follows:

=IF(AND(B11>10,B11>6,B12>9<15),1,"")

The code does not work because of the 'B12' argument of picking the
line if the number is greater than 9 and less than 15.

Could someone please advise what is the correct way to write this part
of the formula.

Any help would be greatly appreciated.
 
J

joeu2004

crackers said:
I have 9 columns of data in a worksheet that varies all the time.
I have written a formula to retrieve certain lines of the data as
follows:
=IF(AND(B11>10,B11>6,B12>9<15),1,"")
The code does not work because of the 'B12' argument of picking
the line if the number is greater than 9 and less than 15.
Could someone please advise what is the correct way to write this
part of the formula.

First, "AND(B11>10,B11>6,...)" is redundant. If B11>10, then B11>6
is true. So it is sufficient to test only B11>6.

(Or perhaps one of the B11's is a typo.)

With that correct in mind, I think the formula you want is:
AND(B11>6, 9<B12, B12<15).

FYI, you could write "B12>9". I like the above format because it is
similar to what we write in math, e.g. 9<B12<15.
 

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