# Changing cell values based on another cell

Lets say that I have 3 parameters/cells:

• High (Cell A1)
• Medium (Cell A2)
• Low (Cell A3)

the fixed values for these cells are 2, 2 ,2

how can I change the value of cellA1 based on the changes of cellA2, or cellA3. for example: if cellA2 value is 1, I have to add 1 to cellA1, and if its Zero I have to add 2 to ceelA1.

-

## migrated from stackoverflow.comDec 26 '12 at 17:32

This question came from our site for professional and enthusiast programmers.

Simple changes can be tracked like this. in cell A2 put this =A1+1 Its possible to put complicated ones as well – Naresh Dec 24 '12 at 11:13
@Naresh : I would -1 that comment if I could. OP asks for conditional logic. Your formula breaks on his second case (if it's zero). – Alexandre P. Levasseur Dec 24 '12 at 14:01
@toti You need to tell us a bit more. How many conditions or statuses are there ? Is it only cell A1 that you will modify and expect the other cells to follow ? What should happen if the value entered is something else than 0 or 1 ? – Alexandre P. Levasseur Dec 24 '12 at 14:02
Also, what did you already try? – Hennes Mar 30 at 15:16

``````A1 formula: =(2-A2)+B1