0% found this document useful (0 votes)
16 views

Lab02 Example

The document contains examples of logical functions such as AND, OR, IF, VLOOKUP, COUNTIF, SUMIF being used to evaluate conditions and return true or false, look up values, count items in categories, sum values that meet certain criteria, and calculate discounts based on spending amounts and member type. Tables of data are provided as inputs for the functions with results shown.

Uploaded by

3456123
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lab02 Example

The document contains examples of logical functions such as AND, OR, IF, VLOOKUP, COUNTIF, SUMIF being used to evaluate conditions and return true or false, look up values, count items in categories, sum values that meet certain criteria, and calculate discounts based on spending amounts and member type. Tables of data are provided as inputs for the functions with results shown.

Uploaded by

3456123
Copyright
© © All Rights Reserved
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Value Function Result Function

1 =AND(TRUE, TRUE) TRUE =OR(TRUE, FALSE)


2 =AND(TRUE, FALSE) FALSE =OR(FALSE, FALSE)
3 =AND(A2=A4-A3,A3=2) TRUE =OR(A2=A4-A3,A3=2)
4 =AND(A5-A3=A3, A4=3, A2=A4) FALSE =OR(A5-A3=A1, A4=3, A2=A4)
Result
TRUE
FALSE
TRUE
TRUE
Item Category Price Category Check Price Check
Pencil Stationery $ 58.00 No Error No Error
Ruler $ 124.00 Missing Category No Error
Desk Furniture $ - No Error Invalid Price
A4 File $ (100.00) Missing Category Invalid Price
Calendar $ - Missing Category Invalid Price
Error Check Function
=IF(B2<>"", "No Error", "Missing Category")
=IF(C2>0, "No Error", "Invalid Price")
Result
No Error
No Error
Item Category Price
Pencil Stationery $ 58.00
Ruler Stationery $ 124.00
Desk Furniture $ 550.00
A4 File Stationery $ 100.00
Calendar Stationery $ 158.00
Bookshelf Furniture $ 258.00

Category No. of Item Sum


Stationery 4 $ 440.00
Furniture 2 $ 808.00
Function Result
=COUNTIF(B2:B7, "Stationery") 4
=COUNTIF(B2:B7, B4) 2
=COUNTIF(C2:C7, ">=150") 3

=SUMIF(A2:A7, "Desk", C2:C7) 550


=SUMIF(B2:B7, B2, C2:C7) 440
Spending Over Member Type Discount Rate New Member Discount
500.00 Silver 0.95 0.90
1000.00 Gold 0.90 0.85
2000.00 Diamond 0.85 0.80

Member Name Spending Member Type New Member? Discount Rate


Simon 505.00 Silver No 0.95
Tony 2010.00 Diamond Yes 0.80
Kitty 888.00 Silver Yes 0.90
Chloe 1234.00 Gold No 0.90
Function Result
=VLOOKUP(600, A2:D4, 2, TRUE) Silver
=VLOOKUP(600, A2:D4, 2, FALSE) #N/A
=VLOOKUP("Gold", B2:D4, 2, FALSE) 0.9
A1 4
2 B5
A3 6

0 1 1 TRUE

Pencil Stationery 100


Ruler Stationery 150
Desk Furniture 550 450
A4 File Stationery 200
Calendar Stationery 150
Bookshelf Furniture 300

300 Silver 0.85


500 Gold 0.8
1000 Diamond 0.75
0.8

You might also like