excel formulas

G

George Yorks

In a spread sheet have a number of senarios.

Cell b1 contains the number 4
would like to create a formula as follows.
If the number in cell b4 is equal to b1 the result is
zero; if the number in cell b4 is greater that b1 by one
the result is one; if the number in b4 is 1less than b1
the number would be 3.
 
R

Ron Rosenfeld

In a spread sheet have a number of senarios.

Cell b1 contains the number 4
would like to create a formula as follows.
If the number in cell b4 is equal to b1 the result is
zero; if the number in cell b4 is greater that b1 by one
the result is one; if the number in b4 is 1less than b1
the number would be 3.

=IF(B1=B4,0,IF(B4<B1,3,IF(B4=B1+1,1,"undefined")))

Note that you have not defined the desired result if the number in cell b4 is
greater than b1 by more than one.


--ron
 
M

Michael

Use the following expression...=IF(B4=B1,0,IF(B4=B1+1,1,IF
(B4<B1,3,"")))...I used "" for any other scenerio...I
don't know what you want it to say if greater than the
number if more than 1. For example, you could say
 

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