Académique Documents
Professionnel Documents
Culture Documents
Logical Functions
Business Applications
Logical function finds a lot of application in the business. There are many situations when a
particular criteria is set for the application of particular terms and conditions. Sometimes,
business decision variables are decided after taking into consideration a lot of constraints.
Logical functions can be used to deal with many such situations. Some of them are:
1
The volume discount of 1% is applicable if the quantity sold is more than 5000 units
but less than or equal to 7500
The volume discount of 1.5% is applicable if the quantity sold is more than 7500 units
but less than or equal to 10000
The volume discount of 1.5% is applicable if the quantity sold is more than 10000
The use of logical function will help in deciding which customers are eligible for which rate
of discount.
2
Aviation Industry: In aviation industry, frequent flyer program is one of the areas where
logical functions is used. Frequent flyer program (FFP) is a loyalty program offered by
many airlines. Typically, airline customers enrolled in the program accumulate frequentflyer miles (kilometres, points, segments) corresponding to the distance flown on that
airline or its Companies can use logical functions to find out which flyer has completed
the suggested flyer miles to win the loyalty program.
Employee Data Management: Based on the employees salary, logical functions can be
used to determine the variable components in the employees salary like bonus, fringe
benefits, etc.
For example, the criteria is, if the employee salary is greater than or equal to Rs. 80000, then
bonus will be 15% of the salary otherwise the bonus will be 10% of the salary. In this
scenario, we can use IF function to determine bonus for various salaries of different
employees.
4
Equity research: when the equity research companies are shortlisting the equities for
further analysis, the mostly follow a given criteria. For example, ABC company is
shortlisting the Indian equities for the further analysis so that it can invest in the stock
market. It has given the following criteria to shortlist the equities
Price to earnings ratio is to be less than 10
Sales margin should be more than 40 %
Debt equity ratio should be less than 1
Here the firm can use logical functions to arrive at the desired set of equities.
Description of Dataset
The dataset pertains to the data of the students at IIM-Luchnow for the year 2015-2016. The
data is hypothetical in nature to some extent. The data contains 15 variables which are
described as follows:
1
S. No. - It gives serial number. It show that data pertains to a total of 929 students.
Allotted Room This column gives the hostel and room number of each student. The
two rightmost digits give the room number of the student while the remaining left part
gives the hostel number. However this rule doesnt apply to hostel 16 and FPM
students. For example, number 1421 under the head Allotted number gives that the
student lives in room number 21 of hostel 14.
PGP Roll Number - This column gives the data of the roll number of the students.
Data either pertains to Post Graduate Programme students (PGP), Fellowship Program
students (FPM) and Agricultural Business Management students (ABM). Also it gives
details of both the batches of all the courses.
SR.NO. This column gives the data of CAT registration number of the students.
This is the unique identification number used at the time of appearing for CAT.
Programme- This gives the programme in which a student has been enrolled into.
10 Committees There are various committees one can join. This column gives the
committee a particular student has joined.
15 Amul - this column gives the amount due with the Amul shop
16 GnB This give the data of amount outstanding to be paid to the GnB shop
17 Night Mess This give the amount payable to the night mess
18 Quiz 1 - This gives the data of marks scored by the student in quiz one
19 Quiz 2 - This gives the data of marks scored by the student in quiz two.
20 Percentage change - This column gives the data of the percentage change in marks of
quiz 2 as compared to quiz 1.
The data set has been used to generate the questions which requires the use of Logical
functions.
DISCLAIMER: Data till Programme pertains to real information of the students while the
rest of the data is hypothetical
AND - Tests a number of user-defined conditions and returns TRUE if ALL of the
conditions evaluate to TRUE, or FALSE otherwise.
NOT - Returns a logical value that is the opposite of a user supplied logical value or
expression (ie. returns FALSE is the supplied argument is TRUE and returns TRUE if
the supplied argument is FALSE)
IF - Tests a user-defined condition and returns one result if the condition is TRUE,
and another result if the condition is FALSE.
Result-Larger
IFERROR - Tests if an initial supplied value (or expression) returns an error, and if
so, returns a supplied value; otherwise the function returns the initial value.
For example excel displays the #div error when a number is divided by 0
However if we use the iferror function & replace the value by , the cell
returns a blank value
IFNA - Tests if an expression returns the #N/A error and if so, returns an alternative
specified value; Otherwise the function returns the value of the supplied expression
For example using the vlookup function in a the table where the value is not
present would result in the #N/A error
Question 1: If a student has secured more than 85 marks in graduation, class 12th and class
10th. How can a formula be written to make him eligible for scholarship?
Answer:
Suppose K2, L2 and M2 contains the graduation, 12th and 10th marks of the first student
respectively. Then for a person to be eligible for the scholarship, the logic to be applied is:
K2(Graduation Marks)>85
L2(12TH Marks)>85
M2(10th Marks)>85
=IF(AND(K2>=85,L2>=85,M2>=85),"Scholarship Awarded","Ineligible")
Same formula can be copied to rest of the cells to find out the eligibility of rest of the
students.
Question 2: How can a formula be written to show the CGPA of a student if he belongs to
PGP-II or ABM-II? Write NA for first year students.
Answer:
Suppose G column contains the information about the programs of the students. Then
whether to show the CGPA of the person or not depends on:
=IF(OR(G2="PGP-II",G2="ABM-II"),RAND()*10,"NA")
Here we are using rand()*10 to generate random CGPA of the students.
Answer:
Suppose column W contains the CGPA of students. Then logic to judge a student pass or fail
is:
=IF(NOT(OR(W2="NA",W2>3.5)),"repeater",IF(W2="NA","1st Year","pass"))
Here if logic NOT(OR(W2="NA",W2>3.5)) is true then output will be repeater otherwise
another if function will be called, IF(W2="NA","1st Year","pass").
Question 4: A party has been organised in the college. All the students from Western and
Southern region are invited to 'Taj Hotel', students from Northern and Eastern region are
invited to 'Hilton'. Rest of the students are invited to 'Hyatt'. Write a formula to find out which
student will be invited to which Hotel.
Answer:
Suppose H column contains the list of states to which the students belong, AM column
contains the list of the states and AN column contains the list of the regions to which those
states belong. Then the logic involved in finding out which student will go to which hotel is:
=IF(OR(VLOOKUP(H2,REGION,2,FALSE)="Western",VLOOKUP(H2,REGI
ON,2,FALSE)="Southern"),"TAJ HOTEL" ,
IF(OR(VLOOKUP(H2,REGION,2,FALSE) = "Eastern" ,
VLOOKUP(H2,REGION,2,FALSE)="Northern"),"HILTON","HYATT"))
Question 6: If a student's CAT percentile is less than 90 or his Graduation marks is less than
85, he is required to do an one month remedial. Write a formula (using XOR function) to find
out who all are required to do the remedial course.
Answer:
Suppose columns K and N contains the graduation marks and cat percentile respectively.
Then logic to find out whether a student should attend the remedial or not is:
If N2<90 or K2<85, then TRUE (i.e. Should attend the 1 month remedial)
Else FALSE (i.e. no need to attend the remedial)
=XOR(N2<=90,X2<=85)
Here XOR function returns TRUE only when one of the two condition is TRUE, else it
returns FALSE.
Question 7: Write a formula to find out who all are required to do three month remedial
classes. The criteria for the same is that the student should have less than 90 percentile in
CAT and less than 85 in graduation.
Answer:
Suppose columns K and N contains the graduation marks and cat percentile respectively.
Then logic to find out whether a student should attend the 3 months remedial or not is:
If N2<90 and K2<85, then TRUE (i.e. Should attend the 3 months remedial)
Else FALSE (i.e. no need to attend the remedial)
=AND(N2<90,X2<85)
If K2>85 and O2=YES and (either L>90 or M>90), then student is all-rounder
Else not an all rounder
Question 9: To be eligible for student loan, following are the criteria: (i) the student should
be from PGP-1 or ABM- 1. (ii) If the student is a girl, she should have secured greater than
80% in graduation and 95 percentile in CAT. (iii) If the student is a male, he should have
secured more than 90% in graduation and 98.5 percentile in CAT. Write a formula for the
same.
Answer:
Suppose columns F, G, K, L, M and N contains the sex, program, graduation marks, 12 th
marks, 10th marks and cat percentile respectively. Then logic to find out whether a student is
eligible for loan or not:
If (G2=PGP-I or G2=ABM-I)
AND
If F2=F ( K2>80 and N2>95)
OR
If F2=M (K2>90 and N2>98.5)
Then student is eligible for loan.
=IF(OR(G2="PGP-I",G2="ABM-I"),IF(F2="F",IF(AND(N2>95,M2>80),"Loan
Eligible","Not Eligible for Loan"),IF(OR(N2>98.5,M2>80),"Loan
Eligible","Not Eligible for Loan")),"Not Eligible for Loan")
Question 10: Students eat at different food joints in the campus. At the end of Term 1, the
accounts payable by each student was calculated by all the eateries. If a student has more
than Rs.2700 payable in any of the food joints or has total amount payable more than Rs.
7500, a mail was sent by PGP office asking the student to pay the bill, and otherwise the bill
was considered to be within the limits. Write a formula to find out who has to pay the bill and
who does not have to pay the bill.
Answer:
Suppose columns P, Q and R contains the balance due of a student in Amul, GnB and night
mess respectively. Then logic to find out whether a student will get a notice from PGP office
or not:
=IF(OR(SUM(P2:R2)<-7500,OR(P2<-2700,Q2<-2700,R2<-2700)),"Pay the
Bills","Within Limits")
Question 11: The preference of the student regarding food joint is dependent on amount
payable by him. Find out which food joint does the student prefer.
Answer:
Suppose columns P, Q and R contains the balance due of a student in Amul, GnB and night
mess respectively. Then logic to find out which food joint is preferred by the students is:
Question 12: Mess Committee was trying to analyse the food habits of the student. If a
student belonged to 'North Eastern', 'East', 'Southern' region, the student preferred Rice else
Wheat. Find out food preference of the students.
Answer:
Suppose H column contains the list of states to which the students belong, AM column
contains the list of the states and AN column contains the list of the regions to which those
states belong. Then the logic involved in finding out which students food habit is:
=IF(OR(VLOOKUP(H2,REGION,2,FALSE)="Eastern",VLOOKUP(H2,REGI
ON,2,FALSE)="Southern",VLOOKUP(H2,REGION,2,FALSE)="North
Eastern"),"Rice","Wheat")
Question 13: Find out number of engineers from Mizoram studying at IIM Lucknow.
Answer:
Suppose H column contains the list of the states and I contains the list of backgrounds of the
students. Then formula to count all the students who are from Mizoram state and have
Engineering as their background is:
=COUNTIFS(H2:H930,"Mizoram",I2:I930,"Engineering")
Question 14: Calculate the percentage change in the marks scored by the student in quiz 1
and quiz 2. Use IFERROR function to show "NA" if the percentage change can't be
determined.
Answer:
Suppose columns S and T contains marks of Quiz 1 and Quiz 2 respectively. To calculate the
increase in percentage of marks from quiz 1 to quiz 2, the logic followed is:
=IFERROR(IF(S2<0,(T2-S2)/(-S2),(T2-S2)/S2),"na")
Question 15: PGP is coming up with a new scholarship. The criteria is to recognise only
those students who have secured more than 95 marks in any one of the class tenth or twelfth
class but not in both. Write a formula to determine which student will get the scholarship.
Answer:
Suppose L and M columns contain marks in class 12th and 10th respectively. Then to calculate
whether a student will get the scholarship or not, the logic followed is:
If a student has more than 95 marks in either of the class (12 th and 10th ) then he will
get the scholarship
Else if the student has more than 95 marks in both the class or less than 95 marks in
both the class then he will not get the scholarship.
=IF(XOR(L2>95,M2>95),"eligible","ineligible")
Question 16: The government has come up with a new concession scheme to give discounted
tickets for visiting science and law fest. Concession is only available for the students who
have done either engineering or law. Write a formula to find out who all are eligible for the
concession.
Answer:
Suppose column I contains the background information of the students. Then to find out
whether the students will get the concession or not, the logic followed is:
=IF(OR(I2="Law",I2="engineering"),"give","not give")
Question 17: HRD Ministry has asked for the list of all the students who have score more
than 90 percent in class tenth. Write a formula to extract the list of the students whose names
should be forwarded.
Answer:
Suppose column M contains the class 10th percentage of the students. Then to find out
whether the students will get the HRD scholarship or not, the logic followed is:
If M2>95 then write Yes(i.e. the student will get the scholarship)
Else the student will not get the scholarship
=IF(NOT(M2<90),"yes","no")