Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 414
  • Last Modified:

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
Asked:
RWayneH
1 Solution
 
ButlerTechnologyCommented:
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
 
SteveCommented:
Try this:
 =if(aq2=Bruce",BQ2,if(aq2="Rich",BQ2-O2,"FAIL"))

Open in new window

Note, "FAIL' should be replaced with whatever you want in the Cell if AQ2 doesn't match Bruce or Rich.
0
 
RWayneHAuthor Commented:
Worked!!  Thanks. -R-
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now