Using the IF Excel function to perform logic tests on spreadsheet so that IF a certain condition is met, one thing happens, otherwise another thing happens.
- For updated video clips in structured Excel courses with practical example files, have a look at our MS Excel online training courses . You can even try the Free MS Excel tips and tricks course.
- To see if this video matches your skill level (see the suggested skill score below) do our free MS Excel skills assessment.
- If you are based in South Africa look at the live courses we offer in Johannesburg and Cape Town.
- - 02:18
- - Skill Level: 3
- - What's my skill level
IF Excel function
The IF excel function allows you to change the action that Excel performs, based on some pre defined conditions. In this segment you learn how activate and use the IF function
In this example we have a number of Bank Accounts with their current Balances, we’d like to work out the Interest Charge, but depending on what the balance is the interest rate is different. So if it’s a positive number we’ll get the deposit interest rate of 8%, but if we’re in negative or overdraft, we’ll be charged at 12%.
We can use excels IF function to do this calculation
so you click on the cell where you want the answer
activate the Function Wizard
and find the IF function
and say Ok,
and what it asks is “what is the logical test”
so in this case is were saying is if this number is bigger than 0
then it says “what happens if its true that that number is bigger than 0, what must it do”
and in this case it must take that number,
and multiply it by the deposit interest rate,
we’ll make it absolute,
if it is false, then we can assume that it must be less than 0,
in which case it must take the current balance
and multiply it by the overdraft interest rate.
when you click Ok
and copy it down
you’ll see that what Excel has done is, it has looked at the balance in this case 100, and realized it’s a deposit interest rate and so its given 8
and when its a negative balance in overdraft, the interest rate is more expensive and therefore it’s 12
and similarly with the other calculations