OR Function (Functions in Excel)
Order No. | Cost | Payment Type | Handling Charge | |
AB001 | 1000 | Cash | £ - | =IF(OR(E4="Visa",E4="Delta"),5,0) |
AB002 | 1000 | Visa | £ 5 | =IF(OR(E5="Visa",E5="Delta"),5,0) |
AB003 | 2000 | Cheque | £ - | =IF(OR(E6="Visa",E6="Delta"),5,0) |
AB004 | 5000 | Delta | £ 5 | =IF(OR(E7="Visa",E7="Delta"),5,0) |
What Does It Do? |
This function tests two or more conditions to see if any of them are true. |
It can be used to test that at least one of a series of numbers meets certain conditions. |
Normally the OR() function would be used in conjunction with a function such as =IF(). |
Syntax |
=OR(Test1,Test2) |
Note that there can be up to 30 possible tests. |
Formatting |
When used by itself it will show TRUE or FALSE. |
Example |
The following table shows a list of orders taken by a company. |
A handling charge of £5 is made on all orders paid by Visa or Delta cards. |
The =OR() function has been used to determine whether the charge needs to be applied. |
Order No. | Cost | Payment Type | Handling Charge | |
AB001 | 1000 | Cash | £ - | =IF(OR(E27="Visa",E27="Delta"),5,0) |
AB002 | 1000 | Visa | £ 5 | |
AB003 | 2000 | Cheque | £ - | |
AB004 | 5000 | Delta | £ 5 |
0 comments:
Post a Comment