EXCEL if Help

  • Thread starter Thread starter Dag
  • Start date Start date
D

Dag

What formula do i use if i want to return a 1 if a given
cell is greater than or equal to 0 and less than 18, a 2
if the cell is 18 or greater and a 0 if the cell is less
than 0.

It's embedded if's, but I am having trouble.

Thanks.
 
Dag said:
What formula do i use if i want to return a 1 if a given
cell is greater than or equal to 0 and less than 18, a 2
if the cell is 18 or greater and a 0 if the cell is less
than 0.

It's embedded if's, but I am having trouble.

Thanks.



Dag,

There are a few ways to do this. Here is one that uses the IF
function:

=IF(A1<0,0,IF(A1<18,1,2))


Hope this helps,

Mike
 
=IF(A1<0,0,IF(A1<18,1,IF(A1>=18,2,0)))

--
XL2002
Regards

William

(e-mail address removed)

| What formula do i use if i want to return a 1 if a given
| cell is greater than or equal to 0 and less than 18, a 2
| if the cell is 18 or greater and a 0 if the cell is less
| than 0.
|
| It's embedded if's, but I am having trouble.
|
| Thanks.
 
Back
Top