PFE Chapter 29, Functions in Excel page 26
The function =Left(A19,2) picks out the 2 left-most characters of cell A19. The function
=Mid(A19,4,14) picks out the 14 characters of cell A19, starting with the 4
th
character. And the
function
=Right(A19,3), well ... you’ll figure that one out yourself.
As illustrated in cell A23, the function
Len tells you the number of characters in the text.
You might ask why a finance book needs to consider these functions. Here’s an example
that arose in the writing of this book: In Chapter ??? we discuss the prices of options on General
Motors stock. This data was originally downloaded from the website of the Chicago Board of
Options Exchange (CBOE). When we downloaded the data, here’s what it looked like:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ABCD
Calls Last Sale Puts Last Sale
01 Aug 60.00 (GM HL-E) 3.5 01 Aug 60.00 (GM TL-E) 0.5
01 Aug 60.00 (GM HL-A) 3.4 01 Aug 60.00 (GM TL-A) 0.4
01 Aug 60.00 (GM HL-P) 3 01 Aug 60.00 (GM TL-P) 0.4
01 Aug 60.00 (GM HL-X) 2.9 01 Aug 60.00 (GM TL-X) 0.6
01 Aug 60.00 (GM HL-8) 3.4 01 Aug 60.00 (GM TL-8) 0.5
01 Aug 65.00 (GM HM-E) 0.45 01 Aug 65.00 (GM TM-E) 2.85
01 Aug 65.00 (GM HM-A) 0.45 01 Aug 65.00 (GM TM-A) 1.8
01 Aug 65.00 (GM HM-P) 0.45 01 Aug 65.00 (GM TM-P) 2.4
01 Aug 65.00 (GM HM-X) 1.15 01 Aug 65.00 (GM TM-X) 2.25
01 Aug 65.00 (GM HM-8) 0.4 01 Aug 65.00 (GM TM-8) 2.7
01 Aug 70.00 (GM HN-E) 0.05 01 Aug 70.00 (GM TN-E) 7.9
01 Aug 70.00 (GM HN-A) 0.05 01 Aug 70.00 (GM TN-A) 6.3
01 Aug 70.00 (GM HN-P) 0.05 01 Aug 70.00 (GM TN-P) 0
01 Aug 70.00 (GM HN-X) 0.2 01 Aug 70.00 (GM TN-X) 7.5
01 Aug 70.00 (GM HN-8) 0.05 01 Aug 70.00 (GM TN-8) 6.8
Other information
Option expiration year and month
Option exercise price
GENERAL MOTORS OPTION DATA
Downloaded from Chicago Board of Options Exchange
Web Site
The information in columns A and C gives information about the option, including the
expiration year and month, the exercise price, and a parenthetical item that shows you the stock