formula help

B

B.B

In need of a formula
Cell A1 will have a number from 1 to 12 in it
Cell B1 needs to add 1 to cell A1 with one exception when cell A1 is entered
with 12 cell B1 must also show 12
thanks to all who help.
 
F

Franz Verga

B.B said:
In need of a formula
Cell A1 will have a number from 1 to 12 in it
Cell B1 needs to add 1 to cell A1 with one exception when cell A1 is
entered with 12 cell B1 must also show 12
thanks to all who help.


in B1 type this formula:

=IF(A1<12,A1+1,12)

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
J

Jack Zhong

B.B explained on 2006-8-14 :
In need of a formula
Cell A1 will have a number from 1 to 12 in it
Cell B1 needs to add 1 to cell A1 with one exception when cell A1 is entered
with 12 cell B1 must also show 12
thanks to all who help.

Hi, B.B,

The formula seems the following
=IF(AND(A1>=1,A1<12),A1+1,12)
but you need validate the value in cell A1 or you would have a wrong
result in the case that when the value in cell A1 is out of range you
mentioned. Only you know what B1 will be if A1 is less than 1 or larger
than 12.

Jack
 
F

Franz Verga

Jack said:
B.B explained on 2006-8-14 :

Hi, B.B,

The formula seems the following
=IF(AND(A1>=1,A1<12),A1+1,12)
but you need validate the value in cell A1 or you would have a wrong
result in the case that when the value in cell A1 is out of range you
mentioned. Only you know what B1 will be if A1 is less than 1 or
larger than 12.

Jack

Hi Jack,

I think this is a record... :)

I was just one second faster than you...

--
Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
Top