• Status: Solved
• Priority: Medium
• Security: Public
• Views: 423

# If statement, that adds a formula.

I have a need to add a formula to a cell if the value of other equals a specific value, and based on that value the formula will change.
Starting at AQ2, if it equals “Bruce”, add the formula “=BQ2” in column M, if AQ2 equals “Rich”, put formula “=BQ2-O2 in column M  (the letter O)

I can handle the copying of the formulas down but need a hand doing the double if statements that add a formula in column M.  Please advise and thanks. -R-
0
RWayneH
1 Solution

Commented:
Can the value of AQ2 be anything other than Bruce of Rich?  If those are the only two values than you only need a single if statements.  If there are other values, what do you want to do when it is not Bruce or Rich.
0

Commented:
Try this:
`````` =if(aq2=Bruce",BQ2,if(aq2="Rich",BQ2-O2,"FAIL"))
``````
Note, "FAIL' should be replaced with whatever you want in the Cell if AQ2 doesn't match Bruce or Rich.
0

Author Commented:
Worked!!  Thanks. -R-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.