Excel function IF
The IF function returns different data depending on whether the conditions specified are true or false.
Here is an example :
Under "Price", we want to display $21 for children (less than 16 years old) and $32 for everybody else.
To make this a little simpler, we're going to start out by renaming cells B9 and B10.
To do this, click on B9 (see image below), type in "adult" and press Enter.
Do the same with cell B10 and type in "child".
Select cell C2, click on "Insert Function".
And now select the IF function.
In the logical test field we want to ask whether a person's age is less than 16.
If this is true, the function should display the children's price. Otherwise, it should show the adult price.
Here's what that should look like :
The result will be displayed.
All we need to do is a single AutoFill command ...
You can see the results here :