Professional Documents
Culture Documents
Excel Exercises 2009 DR Wahab
Excel Exercises 2009 DR Wahab
Sum Total for West Region Sum Total where Jan >5000
23050 5900
SUMIF(range,criteria,sum_range)
Range is the range of cells you want evaluated.
Criteria is the criteria in the form of a number, expression, or text that defines which cells will be added.
For example, criteria can be expressed as 32, "32", ">32", "apples".
Sum_range are the actual cells to sum.
If Sum_range is not given Range is summed. In this case range must be numeric
which cells will be added.
RollNo Name Sub1 Sub2 Sub3 Tot Per Grade
B-003 Zubair 56 78 66 200 67%
A-002 Zahid 77 88 90 255 85%
B-002 Bashir 89 90 98 277 92%
B-001 Babar 90 95 90 275 92%
A-001 Ali 50 40 78 168 56%
A-003 Mahmood 78 77 65 220 73%
=IF(AND(G13>=5000,G13<=7000),G13*0.05,G13*0.02)
Percentage Grade
<50% F
>=50 and <65 D
>=65 and <75 C
>=75 and <85 B
>=85 A
Commission Structure
<5000 2%
>=5000 and <10000 5%
>=10000 and <1500 7%
>=15000 8%
LOOKUP
LOOKUP(lookup_value,lookup_vector,result_vector)
Lookup_value is a value that LOOKUP searches for in the first vector. Lookup_value can be a number, text, a logical value, o
Lookup_vector is a range that contains only one row or one column. The values in lookup_vector can be text, numbers, or log
Important The values in lookup_vector must be placed in ascending order: ...,-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwis
Result_vector is a range that contains only one row or column. It must be the same size as lookup_vector.
Remarks
If LOOKUP can't find the lookup_value, it matches the largest value in lookup_vector that is less than or equal to lookup_value
If lookup_value is smaller than the smallest value in lookup_vector, LOOKUP gives the #N/A error value.
A B
Frequency Color
1 4.14 red
2 4.19 orange
3 5.17 yellow
4 5.77 green
5 6.39 blue
6 Formula Description (Result)
=LOOKUP(4.91,A2:A6,B2:B6) Looks up 4.19 in column A, and returns the value from colum
=LOOKUP(5,A2:A6,B2:B6) Looks up 5.00 in column A, and returns the value from colum
=LOOKUP(7.66,A2:A6,B2:B6) Looks up 7.66 in column A, matches the next smallest value
=LOOKUP(0,A2:A6,B2:B6) Looks up 0 in column A, and returns an error because 0 is le
n A, and returns the value from column B that's in the same row (orange)
n A, and returns the value from column B that's in the same row (orange)
n A, matches the next smallest value (6.39), and returns the value from column B that's in the same row (blue)
and returns an error because 0 is less than the smallest value in the lookup_vector A2:A7 (#N/A)
5%
e equivalent.
HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)
Lookup_value is the value to be found in the first row of the table. Lookup_value can be a value, a reference, or
Table_array is a table of information in which data is looked up. Use a reference to a range or a range name.
The values in the first row of table_array can be text, numbers, or logical values.
If range_lookup is TRUE, the values in the first row of table_array must be placed in ascending order: ...-2, -1, 0, 1,
otherwise, HLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be s
Uppercase and lowercase text are equivalent.
Row_index_num is the row number in table_array from which the matching value will be returned. A row_index_
Range_lookup is a logical value that specifies whether you want HLOOKUP to find an exact match or an approxi
Remarks
If HLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than lookup_
If lookup_value is smaller than the smallest value in the first row of table_array, HLOOKUP returns the #N/A error v
A B
Axles Bearings
1 4 4
2 5 7
3 6 8
4 Formula Description (Result)
=HLOOKUP("Axles",A1:C4,2,TRUE) Looks up Axles in row 1, and returns the value f
=HLOOKUP("Bearings",A1:C4,3,FALSE) Looks up Bearings in row 1, and returns the val
=HLOOKUP("B",A1:C4,3,TRUE) Looks up B in row 1, and returns the value from
Because B is not an exact match, the next large
=HLOOKUP("Bolts",A1:C4,4) Looks up Bolts in row 1, and returns the value fr
=HLOOKUP(3,{1,2,3;"a","b","c";"d","e","f"},2,TRUE) Looks up 3 in the first row of the array constant,
will be returned. A row_index_num of 1 returns the first row value in table_array, a row_index_num of 2 returns the second row value in tab
d an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not f
C
Bolts
9
10
11
n row 1, and returns the value from row 2 that's in the same column. (4)
gs in row 1, and returns the value from row 3 that's in the same column. (7)
w 1, and returns the value from row 3 that's in the same column.
an exact match, the next largest value that is less than B is used: Axles. (5)
row 1, and returns the value from row 4 that's in the same column. (11)
first row of the array constant, and returns the value from row 2 in same column. (c)
4000
e second row value in table_array, and so on. If row_index_num is less than 1, HLOOKUP returns the #VALUE! error value; if row_index_n
if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, HLOOKUP will find an exact ma
rror value; if row_index_num is greater than the number of rows on table_array, HLOOKUP returns the #REF! error value.
KUP will find an exact match. If one is not found, the error value #N/A is returned.
VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)
Lookup_value is the value to be found in the first column of the array. Lookup_value can be a value, a reference,
Table_array is the table of information in which data is looked up. Use a reference to a range or a range name, su
If range_lookup is TRUE, the values in the first column of table_array must be placed in ascending order: ..., -2, -1,
You can put the values in ascending order by choosing the Sort command from the Data menu and selecting
The values in the first column of table_array can be text, numbers, or logical values.
Col_index_num is the column number in table_array from which the matching value must be returned. A col_inde
Range_lookup is a logical value that specifies whether you want VLOOKUP to find an exact match or an approxim
Remarks
If VLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than or equa
If lookup_value is smaller than the smallest value in the first column of table_array, VLOOKUP returns the #N/A err
If VLOOKUP can't find lookup_value, and range_lookup is FALSE, VLOOKUP returns the #N/A value
A B C
1 Density ViscosityTemperature
2 0.457 3.55 500
3 0.525 3.25 400
4 0.616 2.93 300
5 0.675 2.75 250
6 0.746 2.57 200
7 0.835 2.38 150
8 0.946 2.17 100
9 1.09 1.95 50
10 1.29 1.71 0
Formula Description (Result)
=VLOOKUP(1,A2:C10,2) Looks up 1 in column A, and returns the value from column B in t
=VLOOKUP(1,A2:C10,3,TRUE) Looks up 1 in column A, and returns the value from column C in t
=VLOOKUP(0.7,A2:C10,3,FALSE) Looks up 0.746 in column A. Because there is no exact match in
=VLOOKUP(0.1,A2:C10,2,TRUE) Looks up 0.1 in column A. Because 0.1 is less than the smallest v
=VLOOKUP(2,A2:C10,2,TRUE) Looks up 2 in column A, and returns the value from column B in t
ced in ascending order: ..., -2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE; otherwise VLOOKUP may not give the correct value. If range_lookup is FA
lue must be returned. A col_index_num of 1 returns the value in the first column in table_array; a col_index_num of 2 returns the value in th
nd an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not
Symbol
E
D
C
B
A
alue. If range_lookup is FALSE, table_array does not need to be sorted.
of 2 returns the value in the second column in table_array, and so on. If col_index_num is less than 1, VLOOKUP returns the #VALUE! erro
s, if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, VLOOKUP will find an exact ma
returns the #VALUE! error value; if col_index_num is greater than the number of columns in table_array, VLOOKUP returns the #REF! erro
OKUP will find an exact match. If one is not found, the error value #N/A is returned.
UP returns the #REF! error value.
S_Code Name Area Jan Feb Mar Total
B-003 Zubair West 4000 2000 1500 7500
A-002 Zahid South 3400 2340 5490 11230
B-002 Bashir East 5900 5643 2600 14143
B-001 Babar West 4500 6700 4350 15550
A-001 Ali South 5000 5430 7500 17930
A-003 Mahmood South 3956 8000 9500 21456