Vous êtes sur la page 1sur 22

SUBMITTED BY GROUP4

[COMPANY NAME] | [Company address]

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

Sales discount (volume discounts): it is general practice to provide volume discounts to


the customers if they purchase more than a particular level of quantity. However, this
discount also varies with the quantity of the goods purchased. For example, XYZ Ltd has
a credit policy which states
a

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.

Name This gives the name of the students.

Gender- This gives the gender of the students.

Programme- This gives the programme in which a student has been enrolled into.

State Shows the state of the student.

Background- It gives the background of the student admitted.

10 Committees There are various committees one can join. This column gives the
committee a particular student has joined.

11 Graduation Marks- Graduation marks attained by each individual.

12 12th marks - Marks scored by the student in class 12th

13 10th marks - Marks scored by the student in class 10th

14 Percentile - percentile scored by the student in CAT examination

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

List of the Functions:


a

AND - Tests a number of user-defined conditions and returns TRUE if ALL of the
conditions evaluate to TRUE, or FALSE otherwise.

For example there is a given value in cell A1=40.

Applying and function, =and(20<A1<50)

Result-True, since both the conditions are satisfied

OR - Tests a number of user-defined conditions and returns TRUE if ANY of the


conditions evaluate to TRUE, or FALSE otherwise

For example there is a given value in cell A1=20 & A2=30.

Now we apply or function, =or(A1=10,A2=30)

Result-True since one of the conditions is satisfied

XOR-Returns a logical Exclusive Or of all arguments

For example there is a given value in cell A1=15.

Now we apply XOR function, =xor(20<A1>10)

Result-True, since one of the conditions is satisfied

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)

For example there is a given value in cell A1=25.

Now if we apply not function, =not(A1=25)

Result- False, since A1=25

IF - Tests a user-defined condition and returns one result if the condition is TRUE,
and another result if the condition is FALSE.

For example there is a given number in cell a1=30.

Now we apply the if function , =if(A1>10,Larger,Smaller)

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

Applying =ifna(Required cell,range from where vlookup is applied, value we


want)

Result-#N/A would be replaced by the value we want

TRUE - Simply returns the logical true value

For example cell A1=11

Applying the true function with if", =if(A1=11,True())

Result-The cell value would return true

FALSE - Simply returns the logical false value

For example cell A1=22

Applying the false function with if, =if(A1<22,False())

Result-The cell value would return false as A1=22

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

This logic can be represented by a combination of if and and functions.

=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 G2=PGP-II/ABM-II, then show the CGPA


If G2=PGP-I/ABM-I, then write NA

This logic can be represented by a combinations of IF and OR functions.

=IF(OR(G2="PGP-II",G2="ABM-II"),RAND()*10,"NA")
Here we are using rand()*10 to generate random CGPA of the students.

Question 3: Write a formula to show if a student is Pass or a Repeater. If a student


belongs to 2nd year and his CGPA is more than 3.5, show "Pass" in the status column or else
show "Repeater". However, if a student belongs to 1st year, show "1st year" in the Status
column.

Answer:

Suppose column W contains the CGPA of students. Then logic to judge a student pass or fail
is:

If W2=NA, then student is of 1st Year


If W2>3.5, then student is pass
If W2=<3.5, then student is repeater

This logic can be represented by a combination of IF and OR function.

=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:

Locate the value of H2 in AM column


Pick the corresponding region from the AN column

This can be achieved by using a combination of VLOOKUP, IF and OR functions.


Vlookup can be used to find the state to which the student belongs from the list of the states
and then to pick corresponding value from the list of the region. The formula can be written
as:
(Here Region is the range name of column AM)

=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 5: Write a formula to judge the students performance in graduation. A student's


performance in graduation is judged by comparing his graduation score with his 10th and
12th standard score. If his/her, graduation score is less than his 10th and 12th score, write
"Performance dropped" in the Performance Column else write "Performed Well".
Answer:
Suppose columns K, L and M contains the graduation, 12th and 10th marks respectively. Then
logic to find out whether a student Performed Well or his Performance Dropped will be
represented as:

If K2<L2 and K2<M2, then write Performance Dropped in Z2


Else write Performed Well in Z2

This logic can be represented by using IF and AND functions.

=IF(AND(K2<L2,K2<M2),"Performance Dropped","Performed Well")

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)

This logic can be represented using XOR function as follows:

=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)

This logic can be represented using AND function as follows:

=AND(N2<90,X2<85)

Question 8: A student is considered to be an all-rounder if a student plays sports and has


secured more than 85 in graduation. Also, he/she should have secured more than 90 in either
10th standard or 12th standard. Write a formula for the same.
Answer:
Suppose columns K, L, M and N contains the graduation, 12 th, 10th marks and cat percentile
respectively, while column O contains whether students are into sports or not. Then logic to
find out whether a student is all-rounder or not:

If K2>85 and O2=YES and (either L>90 or M>90), then student is all-rounder
Else not an all rounder

This logic can be represented using IF and AND functions as follows:

=IF(AND(O2="YES",K2>85),IF(OR(L2>90,M2>90),"All rounder","Not an all


rounder"),"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.

Else Not eligible for loan

This logic can be represented using IF and OR functions as follows:

=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 (P2>2700 or Q2>2700 or R2>2700)


OR
If (P2+Q2+R2>7500)
Then the student will receive a mail to Pay the Bills.
Else the students balance is Within Limits

This logic can be represented by using IF and OR functions as follows:

=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:

If P2>Q2 and P2>R2, then Amul is preferred


Else if Q2>P2 and Q2>R2, then GnB is preferred
Else Night Mess is preferred

The logic can be represented by using nested IF function:

=IF(P2<Q2,IF(P2<R2,"Amul","Night Mess"),IF(Q2<R2,"GnB","Night Mess"))

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:

Locate the value of H2 in AM column


Pick the corresponding region from the AN column
If the region is North Eastern, East or Southern region the food habit is: Rice
Else Wheat

This can be achieved by using a combination of VLOOKUP, IF and OR functions.


Vlookup can be used to find the state to which the student belongs from the list of the states
and then to pick corresponding value from the list of the region. The formula can be written
as:

=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:

If S2<0, calculate (T2-S2)*100/(-S2)


Else calculate (T2-S2)*100/(S2)
If error occurs while calculating the percentage, writeNA.

This logic can be represented by using IF and IFERROR" functions.

=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.

This logic can be represented by using IF and XOR function.

=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 a student has a background in Law or Engineering then he should get the


concession (write Give in this case)
Else write not give

This logic can be represented by using IF and OR function.

=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

This logic can be represented by using IF and NOT function.

=IF(NOT(M2<90),"yes","no")

Vous aimerez peut-être aussi