You are here:

Excel/If/Then Statement Help

Advertisement


Question
I am trying to write an if then statement.  I would appreciate any of your help, thanks in advance.  Let me first try to explain to you what I am doing.  

There are 16 teams, and I am trying to have excel automatically calculate the points based off of where they finish.  Take team one for instance, if "Team 1" is in cell A1 but not in B1 = 3 points, but if "Team 1" is in cell A1 and B1 = 6 points, and but if "Team 1" is in cell A1 and B1 and C1 = 9 points.  And so on...  I appreciate hearing your opinion on the best way to do this

Answer
Depending on how many conditions you're talking about (there is a limit) then this would just be a complex IF statement:

=IF(AND(A1="Team 1",B1<>"Team 1"),3,IF(AND(A1="Team 1",B1="Team 1",6,IF(AND(A1="Team 1",B1="Team 1",C1="Team 1",9,0)))

You can use the IF function to have Excel place a value in a cell based on one or more conditions or values in other cells.

See this FREE tutorial on my web site for more information on how to use the IF function:

http://www.599cd.com/tips/excel/misc/if-function-sales-tax.asp?key=AllExperts

Let me know if you have any other questions or comments.

Also, be sure to visit my web site and watch my FREE 90-minute MICROSOFT EXCEL VIDEO TUTORIAL. Go to http://www.599cd.com/Excel/AllExperts


Cordially,

Richard Rost
599CD Computer Training
http://www.599cd.com

P.S. Also, don't forget to visit my FREE Microsoft Excel Tips & Tricks Page at http://www.599cd.com/Tips/AllExperts

P.P.S. I volunteer my time at AllExperts to help people, and I get a LOT of questions, so I can't take an hour to answer each question. If you need more DETAILED HELP, come to my TechHelp web site at http://www.599cd.com/TechHelp/AllExperts and I'll take as much time as you need to answer your question.

Out of work? Know someone who is? Get a FREE copy of my Computer Job Skills CD at http://www.599cd.com/JobSkills?key=AllExperts
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Richard Rost

Expertise

I am the author of The Complete Idiot's Guide to Excel 2010.
 
I am happy to answer any questions about Microsoft Excel. If you have an Excel problem, let me help you with it. Also, please be sure to check the Excel Tips & Tricks and Excel Tutorials sections of my web site.
 
You can also watch my complete Excel 2010 For Beginners tutorial online which is over 90 minutes of FREE videos and an eBook.

Experience

I have been using Microsoft Excel since the very early Windows 3.1 versions. I have been teaching Microsoft Excel in the classroom since 1994, and online through computer tutorials since 2002.

Organizations
I have been volunteering on AllExperts in the categories of Microsoft Access, Visual Basic, and Weight Loss for years.

Publications
I am the author of The Complete Idiot's Guide to Excel 2010. I have created a line of computer tutorials online at www.ExcelLearningZone.com and www.599CD.com/Excel.

Education/Credentials
Personally, I am self taught. I've learned everything I know from books and trial & error. If I don't know the answer, I know how to find it.

Past/Present Clients
I have over 20,000 happy clients worldwide.

©2012 About.com, a part of The New York Times Company. All rights reserved.