You follow these steps to convert the text date ranges shown in Figure 3.15 to real dates:
3
Chapter 3 Creating Charts That Show Trends
92
Figure 3.15
A mix of LEFT,
RIGHT,MID,and
FINDfunctions
parse this text to be
used in the
DATE
function.
1.Because the year is always the two rightmost characters in column A, in cell B2, enter
the formula
=RIGHT(A2,2).
2.Because the month is the leftmost one or two characters in column A, ask Excel to find
the first slash and then return the characters to the left of the slash. Enter
=FIND(“/”,A2)to indicate that the slash is in second character position. Use
=LEFT(A2,FIND(“/”,A2)to get the proper month number.
3.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.