Overview of this book

Data Analysis and Business Modeling with Excel 2013
Credits
www.PacktPub.com
Preface
Free Chapter
Getting Data into Excel
Connecting to Databases
How to Clean Texts, Numbers, and Dates
Using Formulas to Prepare Your Data for Analysis
Analyzing Your Data Using Descriptive Statistics and Charts
A Primer on Using the Excel Solver
Learning VBA – Excel's Scripting Language
How to Build and Style Your Charts
Creating Interactive Spreadsheets Using Tables and Slicers
Tips, Tricks, and Shortcuts
Index

If/else/then statements

Conditional statements is our next topic at hand. This functionality will give you, the Excel developer, more control, power, and freedom. You will now be able to add intelligence to your spreadsheets and the following examples will tell you how to do this:

1. Fire up Excel 2013 and create a new spreadsheet. Manually enter the following information:

Column B tells us how much inventory we currently have on hand. In column C, we will determine whether we need to buy more inventory. Column D will tell us whether we have to buy more inventory and how much inventory we have to buy. We are going to make the assumption that we cannot have more than 200 items in our inventory. In other words, we cannot have more than 200 apples, 200 grapes, and so on.

How are we going to determine whether we are low in inventory? We are going to use Excel's conditional statements.

2. In cell C2, type `=if(B2<200,"yes","no")`, as shown in the following screenshot. How does the `if` function work? The...