You are on page 1of 37

IF and Nested IF In the following table mark Pass if marks greater than 50.

Otherwise
Further grade the students as follows-
This function tests a condition. If the condition is met it is
considered to be TRUE. If the condition is not met it is Marks Grade
considered as FALSE. Depending upon the result, one of two >=75 A
actions will be carried out. >50 and <75 B
<=50 C
Syntax
IF(logical_test,value_if_true,value_if_false)
Name Marks Result Grade
A 50 FAIL C
B 60 PASS B
C 80 PASS A
D 75 PASS A
E 10 FAIL C
F 98 PASS A
=IF(B25>50,"Pass","Fail")
rks greater than 50. Otherwise mark fail in result column

=IF(B20>75,"A",IF(B20>50,"B","C"))

0,"Pass","Fail")
IF FUNCTION
(1) Compute the no. of days overdue for each invoice as on date.
(2) Then compute the respective amounts in each of the two amount columns based on the no. of days
and compute the total amount due upto 30 days and over 30 days Today's Date 6/24/2023
Due Date of Amount No. of days Amount Amount
Invoice No. Invoice Outstanding overdue Upto 30 days Above 30 days
14123 15-Sep-23 50,000.00 (83) 50,000.00 - =IF(D8>30,C8,0)
12099 26-Aug-23 10,000.00 (63) 10,000.00 -
11045 14-Jul-23 7,000.00 (20) 7,000.00 -
10001 23-Sep-23 5,000.00 (91) 5,000.00 -
11000 24-Aug-23 4,350.00 (61) 4,350.00 -
13003 4-Sep-23 2,000.00 (72) 2,000.00 -
12001 17-Sep-23 2,000.00 (85) 2,000.00 -
80,350.00 Total 80,350.00 -
* Note that each invoice will fall in only one of the two columns.
IF(D8>30,C8,0)
IF functions are very useful for performing logic, and they vary from simple to complex. I will provide a few
examples.

To enter a basic IF function:

Enter the formula =IF(condition,expression1,expression2), where condition is any condition that is either true
or false, expression1 is the value of the formula if the condition is true, and expression2 is the value of the
formula if the condition is false.

A simple example is =IF(A1<5,10,“NA”). Note that if either of the expressions is a label (as opposed to a
numeric value), it should be enclosed in double quotes.

Try it! Enter appropriate IF formulas in columns C and D. (Scroll to the right to see the answer.)

Sometimes IF functions are nested. For example, there might be three possibilities, depending on whether the
value in cell A1 is negative, zero, or positive. A nested IF formula can then be used as follows.

To use nested IF functions:

Enter the formula =IF(condition1,expression1,IF(condition2,expression2,expression3)). If condition1 is true,


the relevant value is expression1. Otherwise, condition2 is checked. If it is true, the relevant value is
expression2. Otherwise, the relevant value is expression3.

An example is =IF(A1<0,10,IF(A1=0,20,30)). Suppose this formula is entered in cell B2. Then if A1 contains
a negative number, B2 contains 10. Otherwise, if A1 contains 0, B2 contains 20. Otherwise (meaning that A1
must contain a positive value), B2 contains 30.

Try it! Use a nested IF function to fill in the grades in column C. (Scroll to the right to see the answer.)
For each product, if the end inventory is less than or equal to 50 units,
enough units are ordered to bring stock back up to 200; otherwise, no
units of that product are ordered

Product End inventory Order placed (yes or no)? # of units ordered


1 100 No -
2 40 Yes 160
3 20 Yes 180
4 70 No -

Each student gets an A (if score is 90 or above), S for satisfactory (if score
if 60 or above but less than 90) or U for unsatisfactory if score is below 60

Student Score Grade


1 70 S =IF(M22>=90,"A",IF(M22>=60,"S","U"))
2 95 A
3 55 U
4 80 S
5 60 S
6 90 A
Cost/ gallon for the first 500 gallons: ₹ 23.00 Use IF formula to calculate the cost of :
Cost/ gallon for gallons above 500: ₹ 20.00 10 gallons:
Number of gallons: 483 gallons:
10 500 gallons:
483 1600 gallons:
500
1600

Formula :
10 gallons IF(B7<=500,$C$4*B7,500*$C$4+(B7-500)*$C$5)
483 gallons IF(B8<=500,$C$4*B8,500*$C$4+(B8-500)*$C$5)
500 gallons IF(B9<=500,$C$4*B9,500*$C$4+(B9-500)*$C$5)
1600 gallons IF(B10<=500,$C$4*B10,500*$C$4+(B10-500)*$C$5)
F formula to calculate the cost of :
₹ 230
₹ 11,109
₹ 11,500
₹ 33,500

C$4+(B7-500)*$C$5)
C$4+(B8-500)*$C$5)
C$4+(B9-500)*$C$5)
*$C$4+(B10-500)*$C$5)
AND,OR

And This function tests two or more conditions to see if they are all true.
Or This function tests two or more conditions to see if any of them are true.

Syntax
ADD(Logical1,logical2….)
OR(Logical1,logical2….)

Grade the Projects as directed


NPV (m$) IRR
Acceptable 50 25
A if qualify A if qualify A if qualify in
Name NPV (m$) IRR in both, else in any else both,B if qualify
BPLC 80 12 B
REJECT B
ACCEPT in MAY
1 and else
BE C
ADCK 50 40 ACCEPT ACCEPT ACCEPT
Vidyut 10 20 REJECT REJECT REJECT
Akashvani 75 35 ACCEPT ACCEPT ACCEPT
Nigam Sanchar 71 41 ACCEPT ACCEPT ACCEPT
Anand pvt Ltd 65 35 ACCEPT ACCEPT ACCEPT
DFK Yojna 25 5 REJECT REJECT REJECT
Advitiya projects 36 20 REJECT REJECT REJECT
Chitra Balanpur 21 33 REJECT ACCEPT MAY BE
Ashita Brokers 35 29 REJECT ACCEPT MAY BE
Power lines Ratangarh 45 12 REJECT REJECT REJECT
=IF(AND(C27>=$C$14,D27>=$D$14),"ACCEPT","REJECT")
=IF(OR(C27>=$C$14,D27>=$D$14),"ACCEPT","REJECT")
=IF(AND(C27>=$C$14,D27>=$D$14),"ACCEPT",IF(OR(C27>=$C$1
CCEPT",IF(OR(C27>=$C$14,D27>=$D$14),"MAY BE","REJECT"))
Serial no. Text Functions Syntax
1 Left LEFT(text,[num_chars])
2 Right RIGHT(text,[num_chars])
3 Mid MID(text,start_num,num_chars)
4 Find FIND(find_text,within_text,[start_num])
5 Len LEN(text)
Functions of Syntax
Returns a specified number of characters from the start of a supplied text string
Returns a specified number of characters from the end of a supplied text string
Extracts a substring from a string (starting at any position)
Returns the position of a supplied character from within a supplied text string (case-sensitive)
Returns the length of a supplied text string
Complete the following table.
ID: First Name.First letter of the surname
Name First name Last name First letter 1 ID
Aditi Garg Aditi Garg G aditi.g
Rajat Gupta Rajat Gupta G rajat.g
Katrina Kaif Katrina Kaif K katrina.k
Ajay Devgan Ajay Devgan D ajay.d
Tom Hanks Tom Hanks H tom.h
Cameron Diaz Cameron Diaz D cameron.d
Chitra Saraf Chitra Saraf S chitra.s
Yash Saraogi Yash Saraogi S yash.s
Kaushik Basu Kaushik Basu B kaushik.b
Raghuram Rajan Raghuram Rajan R raghuram.r
Sachin Tendulkar Sachin Tendulkar T sachin.t
There are several Excel functions that allow you to count values, or sum or Serial No. Gender Age Sales ($ '00)
average values, subject to conditions. 1 Male 18 62
COUNTIF, SUMIF, AVERAGEIF (for a single condition)
COUNTIFS, SUMIFS, and AVERAGEIFS (for multiple conditions). 2 Female 21 73
These are all very handy functions, and you should definitely learn how to use 3 Female 18 74
them. 4 Female 18 45
5 Male 18 77
6 Female 20 57
The COUNTIF function counts all values in a specified range that satisfy a 7 Female 18 67
certain condition.
8 Male 19 90
To use the COUNTIF function: 9 Male 19 77
10 Male 22 83
Enter the formula =COUNTIF(criterion_range,condition) in any cell, where
condition is any expression that evaluate to TRUE or FALSE. This counts all 11 Female 20 71
values in criterion_range that satisfy the condition. 12 Female 20 75
The condition can be tricky to specify. If we want a specific value, such as 13 Female 20 72
Male, we can specify it easily as "Male" (quotes required), or we can use a cell 14 Female 24 82
reference such as R4. Also, if we want a specific inequality, such as younger 15 Female 18 68
than 20, we can specify it literally as "<20". But if we want it to be younger
than the value in cell R4, then we need to piece it together as a literal part, 16 Male 18 86
"<", and a variable part, whatever is in cell R4. The correct syntax is "<"&R4. 17 Female 24 77
The ampersand (&) symbol connects the two pieces. For example, if we want 18 Male 21 68
to know the number of people who are older than 20, the correct formula is
=COUNTIF(N4:N75,">"&R4). 19 Male 20 86
20 Female 21 46
21 Male 20 80
22 Female 18 81
23 Male 20 84
24 Female 19 71
The SUMIF function sums values in one range where a condition in a
corresponding range is satisfied. Similarly, the AVERAGEIF function averages 25 Female 18 76
values where a condition is satisfied. Usually, the setup is like the example to 26 Male 21 81
the right, where we want to sum or average scores in one column (O), but
only for rows that satisfy a condition on another column (M or N). 27 Female 18 99
28 Male 20 72
To use the SUMIF or AVERAGEIF functions: 29 Female 18 78
Enter the formula =SUMIF(criterion_range,condition,sum_range). This sums 30 Female 21 67
all values in sum_range where the corresponding value in criterion_range
satisfies the condition. Note that the criterion_range is listed first, and the
sum_range is listed last. To average instead of sum, enter the similar formula
=AVERAGEIF(criterion_range,condition,average_range).
only for rows that satisfy a condition on another column (M or N).
To use the SUMIF or AVERAGEIF functions:

Enter the formula =SUMIF(criterion_range,condition,sum_range). This sums


all values in sum_range where the corresponding value in criterion_range 31 Female 21 89
satisfies the condition. Note that the criterion_range is listed first, and the
sum_range is listed last. To average instead of sum, enter the similar formula 32 Female 19 70
=AVERAGEIF(criterion_range,condition,average_range). 33 Female 19 77
34 Female 18 54
35 Male 22 83
36 Female 19 74
37 Male 19 87
38 Male 18 75
39 Male 20 86
40 Male 21 77
41 Male 20 73
42 Male 20 74
43 Female 20 79
44 Male 18 80
45 Male 20 77
46 Female 21 72
47 Male 19 77
48 Male 19 71
49 Female 23 70
50 Female 19 68
51 Female 24 79
52 Male 19 75
53 Male 18 80
54 Female 19 73
55 Female 21 61
56 Female 21 62
57 Male 19 68
58 Male 19 92
59 Female 20 85
60 Male 22 77
61 Female 19 79
62 Male 20 86
63 Female 19 83
64 Male 19 83
65 Male 18 76
66 Female 24 89
67 Female 18 72
68 Female 21 69
69 Male 23 66
70 Male 24 71
71 Male 20 80
72 Female 18 61
73 Male 22 45
Location Criterias
Mumbai Gender condition Female
Delhi Age cutoff 18
Kochi Sales Target Cutoff 87
Bengaluru Location Mumbai
Kolkata
Gangtok Gender:
Kochi Total Number of employees 38
Bengaluru Total Sale Achieved 2745
Delhi Average Sale achieved 72.24
Chennai
Kolkata Age Based:
Gangtok Total Number of employees 18
Kochi Total Sale Achieved 1311
Kolkata Average Sale achieved 72.83
Pune
Thiruvananthapuram Gender and Age Based:
Bengaluru Total Number of employees 11
Kochi Total Sale Achieved 775
Chennai Average Sale achieved 70.45
Gangtok
Mumbai Location Based:
Delhi Total Number of employees 7
Kochi Total Sale Achieved 495
Pune Average Sale achieved 70.71
Kolkata
Pune
Thiruvananthapuram
Kochi
Chennai
Jammu
Delhi
Pune
Pune
Jammu
Kolkata
Mumbai
Bengaluru
Chennai
Delhi
Jammu
Thiruvananthapuram
Pune
Chennai
Kochi
Kolkata
Jammu
Mumbai
Pune
Delhi
Bengaluru
Kochi
Gangtok
Asansol
Kochi
Asansol
Pune
Mumbai
Kolkata
Chennai
Pune
Kochi
Asansol
Chennai
Delhi
Jammu
Mumbai
Bengaluru
Thiruvananthapuram
Kochi
Kolkata
Pune
Kolkata
Mumbai
Given the data below answer the questions given:
Order no. Date Driver's name Item Number of items Transport Destination
100001 2/1/2017 John May TV 25 truck 4 Boston
100002 2/1/2017 Peter White washing machine 30 truck 3 NY
100003 2/2/2017 Carl Nowak washing machine 15 truck 3 Philadelphia
100004 2/3/2017 Peter White TV 32 truck 4 NY
100005 2/3/2017 George Ramsay refrigerator 25 truck 3 Boston
100006 2/3/2017 Carl Nowak washing machine 18 truck 1 Baltimore
100007 2/3/2017 John May refrigerator 15 truck 2 Philadelphia
100008 2/4/2017 Carl Nowak refrigerator 25 truck 3 Baltimore
100009 2/4/2017 Peter White TV 30 truck 1 Pittsburgh
100010 2/4/2017 George Ramsay refrigerator 15 truck 2 NY
100011 2/4/2017 Mertl Pavel microwave 25 truck 3 Philadelphia
100012 2/4/2017 John May washing machine 14 truck 4 NY
100013 2/5/2017 John May washing machine 25 airplane Baltimore
100014 2/5/2017 Carl Nowak TV 30 truck 4 Philadelphia
100015 2/5/2017 George Ramsay microwave 15 truck 3 Boston
100016 2/5/2017 Peter White TV 15 truck 1 Pittsburgh
100017 2/6/2017 John May microwave 25 truck 1 NY
100018 2/7/2017 John May TV 30 truck 4 Philadelphia
100019 2/8/2017 George Ramsay washing machine 13 truck 3 Baltimore
100020 2/8/2017 Peter White refrigerator 25 truck 2 Philadelphia
100021 2/8/2017 Carl Nowak microwave 30 truck 1 Pittsburgh
100022 2/8/2017 Peter White washing machine 15 airplane NY
100023 2/8/2017 John May microwave 25 truck 4 Boston
100024 2/9/2017 George Ramsay washing machine 34 truck 3 Baltimore
Countif / Countifs Result
Number of orders in Boston : 4
Number of microwave orders : 5
Number of journeys with truck 3: 8
Number of Peter White journeys: 6
How many times are no. of items less than 20: 9
Number of microvawe orders in Boston : 2
Number of Peter White journeys with truck 1: 2
Number of orders in Boston after 2/3/2017: 0
Number of orders between 2/3/2017 and 2/6/2017: 0

Sumif / Sumifs
Sum of refrigerator items: 105
Sum of washing machine items: 164
Sum of items transported by truck 4: 156
Sum of items transported by trucks: 511
Sum of microwaves transported to NY: 25
Sum of items transported to Pittsburgh by truck 1: 75
Sum of items ordered between 2/3/2017 and
309
2/6/2017:
Sum of items transported to NY, Baltimore and
386
Philadelphia:
Summary December 2017
Date Service Stylist name Payment Price Fill the table below using logical functions
12/1/2017 Shaving Jane cash 7
12/1/2017 Shaving Martha credit card 7 Service
12/1/2017 Shaving Lucy cash 7 Shaving
12/1/2017 Washing and combing Alex cash 60 Washing and combing
12/1/2017 Dyeing Alex credit card 33 Dyeing
12/1/2017 All service Rachel cash 67 Meeting hairstyles
12/1/2017 Meeting hairstyles Lucy cash 33
12/1/2017 Shaving Ashley cash 7
12/2/2017 Shaving Ashley credit card 7 Stylist name
12/2/2017 Shaving Sandy credit card 17 Jane
12/2/2017 Kids Sandy cash 3 Martha
12/2/2017 Shaving Ashley cash 7 Alex
12/2/2017 Shaving Lucy cash 7
12/2/2017 Shaving Jane credit card 7
12/2/2017 Washing and combing Sandy cash 60
12/2/2017 Dyeing Rachel cash 33
12/2/2017 All service Alex credit card 67
12/2/2017 Meeting hairstyles Jane cash 33
12/2/2017 Washing and combing Martha cash 23
12/2/2017 Shaving Sandy cash 7
12/2/2017 Shaving Jane cash 17
12/2/2017 Kids Ashley cash 3
12/3/2017 Kids Sandy credit card 3
12/3/2017 Kids Lucy cash 3
12/3/2017 Washing and combing Martha cash 60
12/3/2017 Dyeing Lucy credit card 33
12/3/2017 All service Rachel cash 67
12/3/2017 Meeting hairstyles Martha cash 33
12/3/2017 Washing and combing Jane credit card 23
12/3/2017 Shaving Rachel cash 7
12/4/2017 Shaving Martha cash 17
12/4/2017 Kids Alex cash 3
12/4/2017 Kids Sandy credit card 3
12/4/2017 Meeting hairstyles Sandy credit card 40
12/4/2017 Kids Jane credit card 3
12/4/2017 Kids Martha cash 3
12/4/2017 Kids Rachel cash 3
12/5/2017 Meeting hairstyles Sandy cash 33
12/5/2017 Meeting hairstyles Alex credit card 33
12/5/2017 Shaving Martha cash 7
12/5/2017 Shaving Martha cash 17
12/5/2017 Washing and combing Rachel cash 33
12/5/2017 Washing and combing Rachel credit card 40
12/5/2017 Meeting hairstyles Rachel cash 40
12/5/2017 Washing and combing Lucy cash 60
12/5/2017 Dyeing Sandy cash 33
12/5/2017 All service Sandy cash 67
12/5/2017 Meeting hairstyles Martha cash 33
12/5/2017 Shaving Ashley cash 7
12/5/2017 Shaving Rachel cash 7
12/6/2017 Meeting hairstyles Rachel cash 33
12/6/2017 Shaving Sandy credit card 7
12/6/2017 Washing and combing Lucy cash 40
12/6/2017 Meeting hairstyles Alex cash 40
12/6/2017 Washing and combing Rachel cash 60
12/6/2017 Dyeing Ashley cash 33
12/6/2017 All service Rachel cash 67
12/6/2017 Meeting hairstyles Sandy cash 33
12/6/2017 Washing and combing Alex cash 23
12/7/2017 Meeting hairstyles Sandy credit card 33
12/7/2017 Shaving Rachel cash 17
12/7/2017 Washing and combing Sandy cash 33
12/7/2017 Washing and combing Martha cash 40
12/7/2017 Shaving Rachel cash 7
12/7/2017 Shaving Ashley cash 7
12/8/2017 Dyeing Lucy cash 33
12/8/2017 All service Rachel credit card 67
12/8/2017 Shaving Lucy credit card 7
12/8/2017 Shaving Rachel credit card 7
12/8/2017 Meeting hairstyles Ashley cash 33
12/8/2017 Shaving Alex cash 17
12/8/2017 Washing and combing Rachel cash 33
12/8/2017 Washing and combing Rachel cash 40
12/8/2017 Shaving Rachel cash 7
12/8/2017 Meeting hairstyles Alex credit card 33
12/8/2017 Shaving Sandy cash 7
12/8/2017 Meeting hairstyles Jane cash 33
12/8/2017 Shaving Ashley credit card 7
12/9/2017 Shaving Ashley credit card 7
12/9/2017 Shaving Rachel cash 7
12/9/2017 Shaving Rachel credit card 17
12/9/2017 Washing and combing Jane credit card 33
12/9/2017 Washing and combing Lucy cash 40
12/9/2017 Shaving Rachel cash 7
12/9/2017 Shaving Ashley cash 7
12/9/2017 Dyeing Rachel cash 33
12/9/2017 Shaving Martha credit card 7
12/9/2017 Dyeing Lucy cash 33
12/10/2017 Washing and combing Jane cash 23
12/10/2017 Shaving Rachel cash 7
12/10/2017 Shaving Rachel credit card 17
12/10/2017 Washing and combing Alex cash 33
12/10/2017 Meeting hairstyles Rachel credit card 33
12/10/2017 Meeting hairstyles Ashley cash 40
12/10/2017 Washing and combing Alex cash 60
12/10/2017 Dyeing Alex cash 33
12/10/2017 All service Ashley cash 67
12/10/2017 Meeting hairstyles Rachel credit card 33
12/10/2017 Washing and combing Jane credit card 23
12/11/2017 Shaving Sandy credit card 7
12/11/2017 Shaving Alex credit card 17
12/11/2017 Washing and combing Sandy credit card 33
12/11/2017 Shaving Martha cash 7
12/11/2017 Dyeing Ashley cash 33
12/11/2017 Dyeing Martha cash 33
12/11/2017 Dyeing Rachel cash 33
12/11/2017 Shaving Alex cash 7
12/11/2017 Meeting hairstyles Lucy cash 33
12/11/2017 Washing and combing Alex credit card 23
12/12/2017 Shaving Ashley credit card 7
12/12/2017 Shaving Ashley cash 17
12/12/2017 Dyeing Ashley cash 33
12/12/2017 Shaving Jane cash 7
12/12/2017 Shaving Ashley credit card 7
12/12/2017 Washing and combing Lucy cash 60
12/12/2017 Dyeing Jane credit card 33
12/12/2017 Shaving Jane credit card 7
12/13/2017 Shaving Lucy cash 7
12/13/2017 Dyeing Jane credit card 33
12/13/2017 Shaving Rachel cash 7
12/13/2017 Shaving Rachel cash 7
12/13/2017 Washing and combing Alex credit card 33
12/13/2017 Dyeing Martha cash 33
12/13/2017 Dyeing Rachel cash 33
12/13/2017 Dyeing Sandy cash 33
12/13/2017 Dyeing Lucy cash 33
12/13/2017 All service Sandy cash 67
12/13/2017 Dyeing Sandy cash 33
12/13/2017 All service Rachel credit card 67
12/13/2017 Shaving Alex credit card 7
12/13/2017 Shaving Martha cash 17
12/14/2017 Washing and combing Jane cash 33
12/14/2017 Dyeing Martha credit card 33
12/14/2017 Meeting hairstyles Martha credit card 40
12/14/2017 All service Lucy cash 67
12/14/2017 All service Lucy cash 67
12/14/2017 Dyeing Alex cash 33
12/14/2017 Dyeing Ashley cash 33
12/14/2017 All service Rachel cash 67
12/14/2017 Dyeing Martha cash 33
12/15/2017 Shaving Ashley credit card 17
12/15/2017 Washing and combing Alex credit card 33
12/15/2017 Washing and combing Rachel cash 40
12/15/2017 Meeting hairstyles Jane credit card 40
12/15/2017 Dyeing Alex cash 33
12/15/2017 Dyeing Rachel cash 33
12/15/2017 All service Martha cash 67
12/15/2017 All service Jane credit card 67
12/15/2017 Washing and combing Sandy credit card 23
12/16/2017 Shaving Sandy cash 7
12/16/2017 Shaving Ashley cash 17
12/16/2017 Dyeing Sandy credit card 33
12/16/2017 Dyeing Martha credit card 33
12/16/2017 Meeting hairstyles Ashley cash 40
12/16/2017 Washing and combing Sandy cash 60
12/16/2017 Dyeing Jane cash 33
12/16/2017 All service Ashley cash 67
12/16/2017 Meeting hairstyles Alex credit card 33
12/16/2017 Washing and combing Sandy cash 23
12/16/2017 Shaving Rachel cash 7
12/16/2017 Shaving Lucy credit card 17
12/16/2017 Washing and combing Rachel cash 33
12/17/2017 Dyeing Ashley cash 33
12/17/2017 Dyeing Sandy cash 33
12/17/2017 Washing and combing Rachel credit card 60
12/17/2017 Dyeing Sandy credit card 33
12/17/2017 All service Martha credit card 67
12/17/2017 Meeting hairstyles Rachel credit card 33
12/17/2017 Dyeing Rachel cash 33
12/17/2017 Shaving Sandy cash 7
12/18/2017 Shaving Lucy cash 17
12/18/2017 Shaving Ashley cash 7
12/18/2017 Shaving Jane credit card 17
12/18/2017 Dyeing Martha cash 33
12/18/2017 Shaving Sandy cash 7
12/18/2017 Shaving Lucy credit card 7
12/18/2017 Dyeing Martha credit card 33
12/19/2017 Shaving Sandy credit card 7
12/20/2017 Shaving Alex credit card 7
12/20/2017 Dyeing Sandy credit card 33
12/20/2017 Shaving Rachel credit card 7
12/21/2017 Shaving Ashley credit card 7
12/21/2017 Shaving Rachel cash 7
12/21/2017 Dyeing Rachel cash 33
12/22/2017 Meeting hairstyles Martha cash 40
12/23/2017 Dyeing Martha credit card 33
12/23/2017 Meeting hairstyles Alex cash 40
12/24/2017 Meeting hairstyles Rachel credit card 33
12/24/2017 Meeting hairstyles Rachel cash 33
12/24/2017 Meeting hairstyles Martha cash 33
12/24/2017 Washing and combing Lucy credit card 60
12/24/2017 Dyeing Jane cash 33
12/24/2017 Washing and combing Martha credit card 60
12/25/2017 Shaving Lucy credit card 17
12/25/2017 Dyeing Rachel credit card 33
12/25/2017 Washing and combing Sandy cash 60
12/25/2017 Washing and combing Lucy cash 60
12/26/2017 Shaving Rachel cash 17
12/26/2017 Shaving Martha cash 17
12/26/2017 Dyeing Sandy credit card 33
12/27/2017 All service Rachel cash 67
12/27/2017 Washing and combing Jane credit card 60
12/27/2017 Washing and combing Rachel cash 60
12/27/2017 All service Rachel cash 67
12/28/2017 Dyeing Sandy cash 33
12/28/2017 Meeting hairstyles Ashley cash 33
12/28/2017 Dyeing Rachel cash 33
12/28/2017 Meeting hairstyles Martha cash 33
12/28/2017 Meeting hairstyles Lucy cash 33
12/28/2017 Dyeing Jane cash 33
12/28/2017 Washing and combing Ashley cash 40
12/29/2017 Dyeing Jane cash 33
12/29/2017 Dyeing Lucy cash 33
12/30/2017 Washing and combing Lucy cash 40
12/30/2017 Dyeing Sandy credit card 33
12/30/2017 Dyeing Rachel credit card 33
12/30/2017 Shaving Jane credit card 17
12/30/2017 Dyeing Rachel cash 33
12/31/2017 Washing and combing Jane cash 40
12/31/2017 Washing and combing Lucy credit card 40
12/31/2017 Dyeing Martha cash 33
12/31/2017 Washing and combing Martha cash 40
12/31/2017 Shaving Sandy cash 17
12/31/2017 Shaving Rachel credit card 17
12/31/2017 Washing and combing Ashley cash 40
12/31/2017 Washing and combing Rachel credit card 40
below using logical functions (Countifs & Sumifs) wherever applicable:

No. of times the service Total price No.of times paid by cash No.of times paid by Card
71 717 42 29
46 1934 31 15
50 1650 35 15
32 1119 21 11

No.of times by the stylist Total price No. of times Shaving No.of times of "Kids" service
25 688 7 1
31 965 8 1
23 701 5 1
Total price by cash
414
1350
1155
735

Sum of price for Shaving between 10/12/2017 and 20/12/2017


0
0
0
Serial no. Lookup Functions Syntax
1 COUNTIF COUNTIF(range,ctiteria)
2 SUMIF SUMIF(range,criteria,[sum_range])
3 AVERAGEIF AVERAGEIF(range,criteria,[average_range])
4 COUNTIFS COUNTIFS(criteria_range1,criteria1,[criteria_range2,criteria2],….)
5 SUMIFS SUMIFS(sum_range,criteria_range1,criteria1,[criteria_range2,criteria2],…)
6 AVERAGEIFS AVERAGEIFS(average_range,criteria_range1,criteria1,[criteria_range2,criteria2],…)
Counts the number Functions of Syntax
of cells within a range that meets the
given condition.
Adds
Finds the
the cells specified
average by a given
(arithmetic mean)condition orby
specified criteria.
the given
condition or criteria.
Counts the number of cells within a range that meets the
given set cells
Adds the of conditions
specifiedor
bycriteria.
a given set of conditions or
criteria.
Finds the average (arithmetic mean) specified by the given
set of conditions or criteria.
COUNTIF FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=COUNTIF(" and select the range you want to test the first criteria on
Step 3: Input the test for the criteria
Step 4: Select the second range you want to test (it can be the range again, or a new one)
Step 5: Input the test for the criteria
Step 6: Close “)” and press enter.
SUMIF FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=SUMIF(" and select the range you want to test the criteria on
Step 3: Select the range you want the sum of
Step 4: Input the test for the criteria
Step 5: Input the sum range
Step 6: Close “)” and press enter.

AVERAGEIF FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=AVERAGEIF(" and select the range you want to test the criteria on
Step 3: Select the range you want the average of
Step 4: Input the test for the criteria
Step 5: Input the average range
Step 6: Close “)” and press enter.
COUNTIFS FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=COUNTIFS(" and select the range you want to test the first criteria on
Step 3: Input the test for the criteria
Step 4: Select the second range you want to test (it can be the range again, or a new one)
Step 5: Input the test for the criteria
Step 6: Repeat the steps as many times as you want
Step 7: Close “)” and press enter.

SUMIFS FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=SUMIFS(" and select the range you want to test the criteria on
Step 3: Select the range you want the sum of
Step 4: Input the test for the criteria
Step 5: Input the sum range
Step 6: Repeat the steps as many times as you want
Step 7: Close “)” and press enter.

AVERAGEIFS FUNCTION
Step 1: Document the criteria or conditions you wish to test for
Step 2: Type "=AVERAGEIFS(" and select the range you want to test the criteria on
Step 3: Select the range you want the average of
Step 4: Input the test for the criteria
Step 5: Input the average range
Step 6: Repeat the steps as many times as you want
Step 7: Close “)” and press enter.

You might also like