Professional Documents
Culture Documents
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.
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.
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
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
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….)
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
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.