Solved

If statement, that adds a formula.

Posted on 2014-01-03
3
382 Views
Last Modified: 2014-01-04
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
Comment
Question by:RWayneH
3 Comments
 
LVL 6

Expert Comment

by:ButlerTechnology
ID: 39753762
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
 
LVL 27

Accepted Solution

by:
Steve earned 500 total points
ID: 39753763
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
 

Author Closing Comment

by:RWayneH
ID: 39756012
Worked!!  Thanks. -R-
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
My experience with Windows 10 over a one year period and suggestions for smooth operation
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question