excel formulas

  • Thread starter Thread starter George Yorks
  • Start date Start date
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.
 
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
 
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
 
Back
Top