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

Day 12 - Lookup and Reference Functions

Uploaded by

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

Day 12 - Lookup and Reference Functions

Uploaded by

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

1.

AND():
The AND function returns TRUE if all its arguments evaluate to TRUE, and returns
FALSE if one or more arguments evaluate to FALSE.
Syntax: AND(logical1, [logical2], ...)

2. OR():
The OR function returns TRUE if any of its arguments evaluate to TRUE, and returns
FALSE if all of its arguments evaluate to FALSE.
Syntax: OR(logical1, [logical2], ...)

3. NOT():
The NOT function reverses the value of its argument.
Syntax: NOT(logical)

4. IF():
The IF function is one of the most popular functions in Excel, and it allows you to
make logical comparisons between a value and what you expect.
So an IF statement can have two results. The first result is if your comparison is True,
the second if your comparison is False.
Use the IF function, one of the logical functions, to return one value if a condition is
true and another value if it's false.
Syntax: IF(logical_test, value_if_true, [value_if_false])

5. IFERROR():
You can use the IFERROR function to trap and handle errors in a formula. IFERROR
returns a value you specify if a formula evaluates to an error; otherwise, it returns
the result of the formula.
Syntax: IFERROR(value, value_if_error)

6. IFNA():
The IFNA function returns the value you specify if a formula returns the #N/A error
value; otherwise it returns the result of the formula.
Syntax: IFNA(value, value_if_na)

7. SUMIF():
You use the SUMIF function to sum the values in a range that meet criteria that you
specify.
Syntax: SUMIF(range, criteria, [sum_range])

8. AVERAGEIF():
Returns the average (arithmetic mean) of all the cells in a range that meet a given
criteria.
Syntax: AVERAGEIF(range, criteria, [average_range])

9. COUNTIF():
Use COUNTIF, one of the statistical functions, to count the number of cells that meet
a criterion; for example, to count the number of times a particular city appears in a
customer list.
Syntax: COUNTIF(range, criteria)
Grade Basic HRA to find HRA as 10% of BASIC, if Basic is
above 3500,otherwise HRA is 12% of BASIC
A 1000 120 120
B 4000 400 400
A 5000 500 500
A 3000 360 360
TRUE TRUE 1 TRUE
if BASIC is 4000 or less then HRA as 90 TRUE FALSE 0 TRUE
9% of BASIC, otherwise HRA is 11% FALSE
of BASIC 360 FALSE TRUE TRUE
550 FALSE FALSE FALSE FALSE
270
0

to find HRA as 10% of BASIC, if Basic 120 to find HRA as 10% of BASIC, if Basic is 100
is above 3500 but less than 4500, below 3500 or basic is above 4500,
otherwise HRA is 12% of BASIC 400 otherwise HRA is 12% of BASIC 480
600 500
360 300

40 Pass
NAME GRADE BASIC HRA PF NET
AJAY A 10000 1500 800 12300
SUNIL B 5000 750 400 6150
VIJAY A 4000 600 320 4920
ANIL A 3000 450 240 3690

SUMIF

To take the total of NET where Basic is above 4,500 18450

To take the total of BASIC where Basic is above 4,500 15000

To take the total of PF where PF is less than 400 560

To take the total of NET where PF is less than 410 14760

AVERAGEIF

To take the average of NET where Basic is above 4,500 9225

To take the average of BASIC where Basic is above 4,500

To take the average of BASIC where GRADE is 'A' 5666.6666667

To take the average of NET where NAMES are ending with JAY 8610

To take the average of NET where NAMES are not ending with JAY 4920

To take the average of NET where NAMES contains letter A 6970

COUNTIF

To count number of employee with Grade 'A' 3

To count number of employee with BASIC is below 5000 2

To count number of employee with BASIC is above 5000 1


1. VLOOKUP():
VLOOKUP stands for vertical look up. This function is used to search a value in the leftmost (fi
column of the given range, and then returns a value in the same row from column you specify
function.
Syntax: VLOOKUP(search_value, range, col_number, [logical value])
In its simplest form, the VLOOKUP function says:
=VLOOKUP(What you want to look up, where you want to look for it, the column number in th
range containing the value to return, return an Approximate or Exact match – indicated as 1/T
or 0/FALSE).

2. HLOOKUP():

HLOOKUP stands for Horizontal look up. This function is used to search a value in the first row
given range, and then returns a value in the same column from a row you specify in the funct

If logical value is omitted or TRUE then values in the first row of the range must be in ascendi
order, otherwise HLOOKUP may not give you correct answer. If logical value is FALSE then ran
does not need to be sorted.
Syntax: HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])

3. LOOKUP():

It is used to search a given value in the given range. It will search for an approximate match i
exact match is not found; the next largest value that is less than search value is returned. Lo
has two formats. In the first format you have to give value to search, then single column or si
row range to search and single row or single column result range. Value is searched from sea
range and result is given from the same row/column of the result range.

In the second format you have to give value to search and the range. Value is searched in the
column of the given range and result is given from the same row but always from the last col
the range.
Syntax: LOOKUP(lookup_value, lookup_vector, [result_vector])
LOOKUP(lookup_value, array)

4. ROW():
Returns the row number of a reference.
Syntax: ROW([reference])

5. ROWS():
Returns the number of rows in a reference or array.
Syntax: ROWS(array)
6. COLUMN():
The COLUMN function returns the column number of the given cell reference. For example, th
formula =COLUMN(D10) returns 4, because column D is the fourth column.
Syntax: COLUMN([reference])

7. COLUMNS():
Returns the number of columns in an array or reference.
Syntax: COLUMNS(array)

8. INDEX():
Returns the value of an element in a table or an array, selected by the row and column numb
indexes.
Syntax: INDEX(array, row_num, [column_num])
INDEX(reference, row_num, [column_num], [area_num])

9. MATCH():
The MATCH function searches for a specified item in a range of cells, and then returns the rel
position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, a
then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item
range.
Syntax: MATCH(lookup_value, lookup_array, [match_type])
Q1. The following worksheet displays the
Distance in Km
distance in kilometers.
Write the steps to find the train and bus fare
12
33
27

41

9
38
22

Q2. The following worksheet displays the data


related to tour packages. TOUR
BALI
EUROPE
MALDIVES
MAURITIUS
SINGAPORE
SWITZERLAND
Train fare in Rs Bus fare in Rs Distance in Km

30 33 Train fare in Rs
58 64 Bus fare in Rs
43 48

67 71

17 19
58 64
43 48

10 DAYS 14 DAYS TOUR


50000 70000 SWITZERLAND
121000 165000
100000 130000
65000 81000
105000 120000
135000 170000
0 10 20 30 40

17 30 43 58 67
19 33 48 64 71

Distan Train Bus


ce in fare in fare in
Km Rs Rs
0 17 19
10 30 33
20 43 48
30 58 64

10 DAYS 14 DAYS 40 67 71
135000 170000
Grade Basic HRA PF NET To know HRA for grade 'D'
A 1000 150 80 1070 450
D 3000 450 240 3210
B 4000 600 320 4280
C 5000 750 400 5350 To know PF for BASIC Salary of 3000
E 6000 900 480 6420 240
C D

Grade A D E
Basic 1000 4000 5000
HRA 150 600 750
PF 80 320 400
NET 1070 4280 5350

1 5 10
2 15 20
3 25 30
4 35 40
5 45 50
Name of the students and the marks scored by them in 3 different subjects are entered in the worksheet from A10 to cell
out of which the first row contains the column headings and the other rows contain the data. Find special average, result-1
result-2 in column E, F and G respectively. Give your own column headings for these three columns. Special Average: Sum
best 2 marks divided by 2. Result-1: A student is declared as "Pass' if he gets 35 or more marks in each subject otherwise 'F
Result-2: A student is declared as 'Pass' if he gets 40 or more marks in each subject and special average is 50 or more,
otherwise 'Fail'.

Name Marks in Sub1 Marks in Sub2 Marks in Sub3


Apurva Ganu 41 64 24
Prof. Pankaj Laxmilal Jain 65 70 78
Mr. Sourav chanda 87 65 34
Sharma abhishek Sanjay 88 39 11
JAYNARAYAN RUSHI 100 54 90
Ms. Anjli Dhanani 66 92 21
Fatema Fanuswala 83 20 73
MISS NIDHI M. BHANDARI 42 77 29
Mr. Niraj Dilip Sharma 44 50 74
Pooja S kanojia 40 32 86
Meenakshi Arya 90 91 77
Mr. SURYAKANT VISHNU PHALLE 34 40 62
Shraddha Sumeet Shirke 75 39 77
Ms. Shephali Deepak Apte 86 10 10
Ms. Sonal shrivastav 35 88 22
SEJAL CHAUDHARY 30 88 12
AANAL DOSHI 47 55 75
Asst Prof. Chahat hargunani 40 20 56
Dr. Kanchan Fulmali 15 80 82
ADITYA PRASHANT GAIKWAD 56 23 32
Akash Rakesh Singh 56 77 13
Chhaya sadhu 62 28 100
Miss Minakshi Shamrao Patil 66 35 86
Prof. Chetan Mahesh Panchal 26 23 92
Miss Sneha Mujumdar 75 40 27

total
6
entered in the worksheet from A10 to cell D35
ntain the data. Find special average, result-1 &
hese three columns. Special Average: Sum of
or more marks in each subject otherwise 'Fail'.
ect and special average is 50 or more,

Speacial Average By 1st Method Speacial Average By 2nd Method


52.5 52.5
74 74
76 76
63.5 63.5
95 95
79 79
78 78
59.5 59.5
62 62
63 63
90.5 90.5
51 51
76 76
48 48
61.5 61.5
59 59
65 65
48 48
81 81
44 44
66.5 66.5
81 81
76 76
59 59
57.5 57.5

1 2

3
min 1.5
-1 5
Speacial Average By 3rd Method Result 1 Result 2
52.5 FAIL FAIL
74 PASS PASS
76 FAIL FAIL
63.5 FAIL FAIL
95 PASS PASS
79 FAIL FAIL
78 FAIL FAIL
59.5 FAIL FAIL
62 PASS PASS
63 FAIL FAIL
90.5 PASS PASS
51 FAIL FAIL
76 PASS FAIL
48 FAIL FAIL
61.5 FAIL FAIL
59 FAIL FAIL
65 PASS PASS
48 FAIL FAIL
81 FAIL FAIL
44 FAIL FAIL
66.5 FAIL FAIL
81 FAIL FAIL
76 PASS FAIL
59 FAIL FAIL
57.5 FAIL FAIL

5 4
2.5 2
Name & basic salary of 100 employees are entered in first two columns. The first row contains the column
headings calculate HRA, DA, MA, GROSS, PF & NET SALARY. HRA is 15% of basic salary or Rs. 200 whichever is
more. DA is 45% of basic salary subject to maximum of Rs. 1000. MA is 18.5% of basic salary subject to
maximum of Rs. 800 and subject to minimum of Rs.100. PF is 8.33% of basic salary if basic salary is above
2000 otherwise PF is NIL. Gross Basic salary + HRA +DA+MA & Net salary = Gross - PF. Net salary must be
rounded off to nearest ten.

Name Basic Salary HRA DA MA GROSS


Apurva Ganu 1500 225 675 277.5 2677.5
Prof. Pankaj Laxmilal Jain 2000 300 900 370 3570
Mr. Sourav chanda 5000 750 1000 800 7550
Sharma abhishek Sanjay 4522 678.3 1000 800 7000.3
JAYNARAYAN RUSHI 5785 867.75 1000 800 8452.75
Ms. Anjli Dhanani 10000 1500 1000 800 13300
Fatema Fanuswala 15000 2250 1000 800 19050
MISS NIDHI M. BHANDARI 2500 375 1000 462.5 4337.5
Mr. Niraj Dilip Sharma 15252 2287.8 1000 800 19339.8
Pooja S kanojia 252 200 113.4 100 665.4
Meenakshi Arya 25125 3768.75 1000 800 30693.75
Mr. SURYAKANT VISHNU PHALLE 10000 1500 1000 800 13300
Shraddha Sumeet Shirke 15000 2250 1000 800 19050
Ms. Shephali Deepak Apte 20000 3000 1000 800 24800
Ms. Sonal shrivastav 2000 300 900 370 3570
SEJAL CHAUDHARY 1500 225 675 277.5 2677.5
AANAL DOSHI 1000 200 450 185 1835
Asst Prof. Chahat hargunani 2555 383.25 1000 472.675 4410.925
Dr. Kanchan Fulmali 65658 9848.7 1000 800 77306.7
ADITYA PRASHANT GAIKWAD 55542 8331.3 1000 800 65673.3
Akash Rakesh Singh 1000 200 450 185 1835
Chhaya sadhu 22552 3382.8 1000 800 27734.8
Miss Minakshi Shamrao Patil 2522 378.3 1000 466.57 4366.87
Prof. Chetan Mahesh Panchal 55225 8283.75 1000 800 65308.75
Miss Sneha Mujumdar 10000 1500 1000 800 13300
ntains the column
Rs. 200 whichever is
lary subject to
ic salary is above
t salary must be

PF NET SALARY
0 2680
0 3570
416.5 7130
376.6826 6620
481.8905 7970
833 12470
1249.5 17800
208.25 4130
1270.492 18070
0 670
2092.913 28600
833 12470
1249.5 17800
1666 23130
0 3570
0 2680
0 1840
212.8315 4200
5469.311 71840
4626.649 61050
0 1840
1878.582 25860
210.0826 4160
4600.243 60710
833 12470
Calculate income tax, surcharge and total tax for the following worksheet.
Income tax is calculated as follows:

Taxable Income Income Tax


First, 150000 Nil
Next, 100000 10%
Next, 75000 20%
Excess 30%
Surcharge is 3% on income tax if taxable income is above 5,00,000.

Name Taxable Income Income Tax Surcharge Total Tax


Apurva Ganu 400000 47500 0 47500
Prof. Pankaj Laxmilal Jain 961790 216037 6481.11 222518.11
Mr. Sourav chanda 411031 50809.3 0 50809.3
Sharma abhishek Sanjay 313099 22619.8 0 22619.8
JAYNARAYAN RUSHI 2260988 605796.4 18173.892 623970.292
Ms. Anjli Dhanani 93476 0 0 0
Fatema Fanuswala 2134613 567883.9 17036.517 584920.417
MISS NIDHI M. BHANDARI 183933 3393.3 0 3393.3
Mr. Niraj Dilip Sharma 660881 125764.3 3772.929 129537.229
Pooja S kanojia 219388 6938.8 0 6938.8
Meenakshi Arya 1465324 367097.2 11012.916 378110.116
Mr. SURYAKANT VISHNU PHALLE 271322 14264.4 0 14264.4
Shraddha Sumeet Shirke 2005078 529023.4 15870.702 544894.102
Ms. Shephali Deepak Apte 120380 0 0 0
Ms. Sonal shrivastav 215823 6582.3 0 6582.3
SEJAL CHAUDHARY 1139644 269393.2 8081.796 277474.996
AANAL DOSHI 2136276 568382.8 17051.484 585434.284
Asst Prof. Chahat hargunani 1912971 501391.3 15041.739 516433.039
Dr. Kanchan Fulmali 1022791 234337.3 7030.119 241367.419
ADITYA PRASHANT GAIKWAD 2162656 576296.8 17288.904 593585.704
Akash Rakesh Singh 451235 62870.5 0 62870.5
Chhaya sadhu 2188702 584110.6 17523.318 601633.918
Miss Minakshi Shamrao Patil 2414446 651833.8 19555.014 671388.814
Prof. Chetan Mahesh Panchal 1666214 427364.2 12820.926 440185.126
Miss Sneha Mujumdar 257914 11582.8 0 11582.8
Consider the following worksheet and calculate Average and Grade. Grade should be calculated using VLOOKUP
and data from range H4:I10.

Students M1 M2 M3 AVG GRD


Ravi 84 48 63 65 A
Karan 73 54 40 55.66667 B+
Kaif 89 95 95 93 A++
Afreen 20 25 30 25 C
Sabha 90 75 74 79.66667 A+
Mr. Sourav chanda 89 47 75 70.33333 A
Sharma abhishek Sanjay 48 95 88 77 A+
JAYNARAYAN RUSHI 86 60 89 78.33333 A+
Ms. Anjli Dhanani 30 71 10 37 B
Fatema Fanuswala 77 67 62 68.66667 A
ed using VLOOKUP

AVG GRD
0C
35 B
45 B+
60 A
75 A+
90 A++
AVG GRD
0C
35 B
45 B+
60 A
75 A+
90 A++

You might also like