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

Data Used in Formula Sales Person Qaurter Sales: VLOOKUP ("Tom",A3:C5,2, FALS E) VLOOKUP ("Tom",A3:C5,3, FALS E)

The document contains examples of Excel formulas like VLOOKUP, HLOOKUP, INDEX, MATCH, OFFSET, INDIRECT, ROW, COLUMNS, ROWS using sample data. The formulas demonstrate looking up values, returning cell references and values based on row and column offsets, and retrieving metadata like number of rows and columns in a range.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views

Data Used in Formula Sales Person Qaurter Sales: VLOOKUP ("Tom",A3:C5,2, FALS E) VLOOKUP ("Tom",A3:C5,3, FALS E)

The document contains examples of Excel formulas like VLOOKUP, HLOOKUP, INDEX, MATCH, OFFSET, INDIRECT, ROW, COLUMNS, ROWS using sample data. The formulas demonstrate looking up values, returning cell references and values based on row and column offsets, and retrieving metadata like number of rows and columns in a range.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Data Used in Formula

Sales Person Qaurter Sales


Arjun Q1 2014 1000
Jane Q2 2013 2000
Tom Q4 2013 3000

Formula Result Commentary


=VLOOKUP("Tom",A3:C5,2,FALS
Q4 2013 Look up and return the quarter value for Tom
E)
=VLOOKUP("Tom",A3:C5,3,FALS
3000 Look up and return the sales value for Tom
E)

Looks for 1500 in C3:C5, and returns the largest value


smaller than the lookup value. The list needs to be
=VLOOKUP(1500,C3:C5,1,TRUE) 1000 sorted in ascending order or else the result could be
wrong

In case of exact match, if the value is not found, it


=VLOOKUP(1500,C3:C5,1,FALSE) #N/A
returns an error

Looks for T in Arjun, Jane and Tom, and settles for


=VLOOKUP("t",A3:C5,3,TRUE) 2000 Jane (as Tom has higher value than T). Returns the
value of 2nd row from the third column
Data Used in Formula
Fruit Apple Banana Orange
Quantity 10 12 5
Quantity $5 $1.20 $2.10

Formula Result Commentary

Returns the quantity of Apple by spotting position of


=HLOOKUP("Apple",B2:D3,2,FAL Apple in the list and returning the value from the
10
SE) second row. Note that range_lookup value is FALSE
indicating exact match

Returns the price of Apple by spotting position of


=HLOOKUP("Apple",B2:D4,3,FAL 5 Apple in the list and returning the price from the third
SE) row.
If range_lookup is FALSE (exact match), an error is
=HLOOKUP("B",B2:D4,3,FALSE) #N/A returned if the match is not found

If range_lookup is TRUE (approximate match), the


largest value less than the look up value is found and
=HLOOKUP("B",B2:D4,3,TRUE) 5 returned. Here "Apple" is less than "B", and hence
value for Apple is returned
Data Used in Formula
Sales Person Q1 2013 Q2 2013 Q3 2014 Q4 2014
Tom 3500 3800 1200 3800
Jane 3700 2800 2900 2700
Arjun 1300 1100 1200 4800

Formula Result Commentary

Returns the value from 2nd row and 2nd column of


=INDEX(B3:E5,2,2) 2800
the array (B3:E5)

There are three array references in the formula


=INDEX((B3:B5,C3:C5,D3:D5),2,1 (B3:B5,C3:C5,D3:D5), and the 2nd array has been
2800 selected (the last argument of the formula). In this
,2)
second array, value in the 2nd row and 1st column is
returned

If the row number or column number is 0, it returns


the entire row or column number. Notice that while
=SUM(INDEX(B3:E5,1,0)) 12300 the formula INDEX(B3:E5,1,0) returns the entire
column, it will show only the first value in the cell.
However, when you SUM it, it adds the entire row

Note that while the value in the cell is an error, it has


returned the entire array B3:E5. Check this by
selecting the entire formula and press F9.
=B3:INDEX(B3:E5,3,4) #VALUE!
When Index is used in conjunction with a cell
reference, it returns the cell reference of the value
(instead of the actual value). In this case instead of
returning 4800, it returns its cell reference E5
Data Used in Formula
Tom 1000
Jane 2000
Arjun 3000

Formula Result Commentary


=MATCH("Tom",A2:A4,0) 1 Returns the position of Tom from the list
=MATCH(B2,B2:B4,0) 1 Returns the position of 1000 from the list

Returns the position as 1, as 1500 is higher than 1000,


=MATCH(1500,B2:B4,1) 1 but lower than 2000. Since there is no exact match, it
returns the value lower than the look up value (when
sorted in ascending order)

Returns error as the list is not sorted in descending


=MATCH(1500,B2:B4,-1) #N/A order
Data Used in Formula
1 a
2 b
3 c

Formula Result Commentary


=OFFSET(A2,0,0) 1 Returns value in A2, as A2 is not offset
=OFFSET(A2,1,0) 2 Returns value is A3, as A2 is offset by 1 row

=OFFSET(A2,0,1) a Returns value is B2, as A2 is offset by 1 column

Returns value is B3, as A2 is offset by 1 row and 1


=OFFSET(A2,1,1) b column
Returns value is A2, as B3 is offset by -1 row and -1
=OFFSET(B3,-1,-1) 1 column
While the cell is offset by 0 row 0 column, the height
=SUM(OFFSET(A2,0,0,3,1)) 6 is specified as 3, which cover the three cell A2:A4, and
returns an array {1;2;3}
Data Used in Formula
3
Hello
A3

Formula Result Commentary


=INDIRECT("A2") 3 Returns the value in Cell A2
=INDIRECT("A"&A2) Hello Returns the value in Cell A3

Returns the value of the Named Range (Hello_NR).


=INDIRECT("Hello_NR") Hello Note: A Named range Hello_NR is created for cell A3.
This named range is used in Indirect in double quotes

Refers to A4, which redirects to A3, and returns the


=INDIRECT(A4) Hello value in A3
Formula Result Commentary
=ROW() 3 Returns the row number of the current cell

=ROW(C6) 6 Returns the row number of the specified cell. Here in


C6, the row number is 6
Formula Result Commentary

=ROWS(A1:A1) 1 Returns the number of rows covered in the array


A1:A1 (which is 1 row)
Returns the number of rows covered in the array
=ROWS(A1:A4) 4
A1:A4 (which is 4 rows)
Returns the number of rows covered in the array
=ROWS({1,2,3;4,5,6}) 2 {1,2,3;4,5,6}. Note that comma denotes column and
semi-colon denotes row
Formula Result Commentary

=COLUMN() 2 Returns the column number of the current cell

=COLUMN(C8) 3 Returns the column number of the specified cell. Here


C is the third column and hence it returns 3
Formula Result Commentary

=COLUMNS(A1:A1) 1 Returns the number of Columns covered in the array


A1:A1 (which is 1 column)
Returns the number of columns covered in the array
=COLUMNS(A1:D1) 4
A1:B1 (which is 4 columns)

Returns the number of columns covered in the array


=COLUMNS({1,2,3;4,5,6}) 3 {1,2,3;4,5,6}. Note that comma denotes column and
semi-colon denotes row

You might also like