Artykuł w języku angielskim w formacie PDF

Transkrypt

Artykuł w języku angielskim w formacie PDF
Strona |1
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Bożena Ignatowska
Examples of applications of text features in a spreadsheet
Introduction
This paper will discuss issues related to the use of text features in a spreadsheet. The purpose of
this article is not so much to present a complete compendium of examples of functions but their
applications.
The article contains examples of possibilities of using dates in a spreadsheet version of MS Office
2007.
Basic information
In a spreadsheet, you can store several types of data, e.g. numbers (including dates), logical values
and text. The text in the worksheet is used to describe situations, values, comments, but often is
also the subject of analysis, or conversion. For large sheets there are also useful functions for
debugging, changing formatting of cell contents. Life / practice brings many interesting solutions.
Functions should be mastered by the person who in future plans to deal with data analysis or
software development, because many of the features shown have a similar use in other programs.
What is text in a worksheet, and what is not?
For spreadsheet, you enter data in the form of numbers (including dates), logical values (true,
false), and text. Sometimes a data input determines whether they are treated as numbers (eg
2012-06-15 contribution is treated as a date), or as text (2012.06.15 contribution will be used as a
text). You can also force the data to be saved as text - in this case at the beginning of each value to
be entered into a cell you need to insert an apostrophe, for example, typing '2012-06-15 will be
treated as text.
Similarly, if you type in “1000.00 zł” the program will treat the value
entered as a number, but if we make a mistake and type in “zł” only,
the program will treat our entry as text (Figure 1).
Note that by default (if we do not change the alignment or way of
formatting cells) numbers are aligned to the right edge and the text
to the left. This is important because using numbers (including
dates), we can perform calculations. If even one value taking part in
the calculations is entered incorrectly, we can obtain an incorrect
result.
Figure 1 Examples of numeric data and text data
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |2
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Task 1
Below (Figure 2) there are examples of numeric and logical text values. Which of them have been
treated in the worksheet as text?
Figure 2 Examples of text, numeric and logical values
Examples of the use of text features
Example 1 Replacing improperly entered dates
Text functions can be used to replace data entered incorrectly – as the date in column B (Figure 3)
to the correct format.
Figure 3 Conversion of data incorrectly recorded from column B to the correct dates
The values in column B, were treated as text by the sheet, you can not perform calculations on
them. You can not, for example, calculate how much time (days) elapsed from the date of the
contract. To do this we need data from a 03/16/2009 date change to the form, eg 2009-03-06.
For this purpose, we "draw" detailed information from the data in column B (Figure 4) concerning:
year (using the RIGHT to grab the four characters from the right side of the text in cell B4),
the date (using the LEFT charge 2 characters from the right side of the text in cell B4),
month (using the MID, starting from the fourth character - skip dot - charge 2 characters).
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |3
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Figure 4 Text functions LEFT, RIGHT and MID used to obtain information on the year, day and month of the contract
Then, on the basis of the information we create a date in the appropriate format. To do this, using
the DATE function (Figure 5), we combine data on the year (cell C4), month (cell D4) and number
of the month (cell E4).
Figure 5 Operation of the DATE function
In well-written dates, we can perform calculations, and use different ways of formatting. Figure 6
shows the formula used to calculate the time in columns G and H. The formula in column G will
give a different result each day, and will show the actual number of days elapsed since the
conclusion of the contract. The formula in column H counts the number of days elapsed since the
conclusion of the contract to June 15, 2012.
Figure 6 Creation of the date and calculating how many days have passed since the conclusion of the contract
Example 2 Separating of information
A similar (to Example 1) way how to apply a text function is illustrated by the Figure 7. Contract
number contains not only the appropriate number but also the year number. For the purposes of
analysis, the information on the year of the contract should be put in a separate column.
The appropriate number of the contract may consist of different number of characters, such as
1/09, 10/09, 100/09, 1000/09.
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |4
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Figure 7 Obtaining detailed information from the contract number
Hence LEFT function is not enough to get a certain number of characters - first you need to check
how many characters we need. To calculate this, we check on which position the slash "/" is and on
this basis, we take a sufficient number of characters (Figure 8).
The place (item number) of slash is calculated with the FIND function. And because the slash itself
is not needed, with the LEFT function we take one character less. To explain it, the formula, which
checks the position of the slash is shown in addition to the auxiliary column K. The full, correct
formula for calculating the number is in column L.
Figure 8 Using FIND and MID functions
How to insert MID function using the wizard is illustrated by Figure 9.
Figure 9 Inserting the MID function using the wizard
Now we have to obtain information about the year of conclusion of contract - based on its number.
To do this:
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |5
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
take the last two digits from the contract number - for example, by using the RIGHT
function,
add "20" (two and zero) as text - remember the apostrophe before the number 20,
combine these two texts in one - for example, by using the CONCATENATE function,
replace the resulting text on value - by using the VALUE function - we replace on the value
in case we wanted to make some calculations, summaries, and additional analysis.
Applying the formula and a piece of the solution are shown in Figure 10 and Figure 11.
Figure 10 Contract number and separated information of the year - formula application
Figure 11 Contract number and separated information of the year – fragment of sheet with the solution
Example 3 Combining data with CONCATENATE function and the & (ampersand)
CONCATENATE function allows you to combine multiple text strings into one. Method of
application of the function is shown in the example below, in column D. It received the formula:
= CONCATENATE (N4, M4)
Instead we can use CONCATENATE function of the &, analogous formula (giving the same result)
would look as follows:
= & M4 N4
or
= "20" & M4
Between a & characters and the other characters in the formula, leave a space. Text (such as 20),
type with the quotation marks.
Practical usage of CONCATENATE function is shown in Figure 12 and 13.
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |6
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Figure 12 Combining the contents of different cells on a worksheet (including spaces)
Figure 13 Combining the contents of different cells on a worksheet (incorrect - no spaces)
The texts can also be connected with the character &. An example is illustrated in Figure 14 and
Figure 15. It is worth noting that you need to remember the space, and because it is treated as the
text, it must be placed in quotation marks. Hence the formula:
= A4 & B4 & C4 will return the text NowakAnnaMaria ("pasting" text without separating words).
If the text is to remind the first and last name, individual elements must be separated by spaces.
The result is the formula:
= A4 & "" & B4 & "" & C4
Figure 14 Combining text with ampersand - the text with spaces
Figure 15 Combining text with ampersand - the text with no spaces (irregular solution)
Example 4 Combining text and data in defined formats
Based on data from the columns R, S and T (contract number, date, value), you should prepare a
short text (Figure 16):
• "The contract value is ......."
• "The agreement was signed on ...."
• "Day of the contract ....."
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |7
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Figure 16 Combining text and data in the defined formats using the TEXT
From previous examples we know how to combine text from different cells and how to join a
different string - for example a space. In the following example we will see how to combine data
and how to format them to be the most readable.
1. Figure 17 illustrates combining text and numbers and formatting of attached numbers and
amounts.
Formatting of numbers is possible thanks to TEXT function, which converts the cell contents into
text and allows you to define how to format the values attached.
Figure 17 Combining text and numbers and formatting numbers by using the TEXT function
The formula in cell U4 consists of three interconnected strings connected by & characters:
= "Value:" & TEXT (T4; "# # # #, 00") & "PLN"
TEXT function allows you to define the way of formatting of attached value. How to format
numbers - the second argument to TEXT function - must also be enclosed in quotation marks, thus
we have the "# # # #, 00" being shown in the example.
Details of the symbols used as the second argument to the TEXT function can be found at
Microsoft Office, text-function, http://office.microsoft.com/pl-pl/excel-help/tekst-funkcjaHP010062580.aspx, details of the formatting on the same website in the Guidelines for number
formats.
2. Figure 18 illustrates combining text and dates and formatting attached dates.
Figure 18 Combining text and dates and formatting dates by using the TEXT function
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |8
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
The formula in cell V4 consists of three interconnected strings connected by & characters:
= "Signed on:" & TEXT (S4, 'dd-mm-yyyy ") &" year "
The second argument of the TEXT function "dd-mm-yyyy" is responsible for the formatting of the
attached date.
3. Figure 19 also illustrates combining text and dates and formatting of attached dates.
Figure 19 Combining text and dates and formatting dates by using the TEXT function
Example 5 Changing the formatting using the PROPER function
Using PROPER function is useful to convert first names and surnames that have been written in
haste with a small letter. Figure 20 shows the example of using PROPER function.
Figure 20 Example of using PROPER function to improve the format / contents sheet
Example 6 Removing unnecessary spaces using DELETE.EXTRA.SPACES function
Figure 21 illustrates an example of removing extra spaces
Figure 21.Przykład use the function to remove extra spaces
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
Strona |9
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Example 7 Checking the length of a string
using the LEN (length) function
Example of use LEN function to count the number of characters in the text is illustrated in Figure
22
Figure 22 Using LEN function to count the number of characters in a cell / text
Tasks to complete
Task 1
You require Surname and first names for project documentation and First names and surname to
issue certificates. Write the appropriate formula.
A
1
Surname
2 Abacki
3 Babaczuk
B
C
Name 1 Name 2
Adam
Adam
Bogdan Bogdan
D
Surname and names
The formula
.................
or
.................
was inserted into cell D2.
Task 2
You require Surname and first names for project documentation and First names and surname to
issue certificates. Write the appropriate formula.
A
1
Surname
2 Abacki
3 Babaczuk
B
C
Name 1 Name 2
Adam
Adam
Bogdan Bogdan
D
Surname and names
The formula
.................
or
.................
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
S t r o n a | 10
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
was inserted into cell E2.
Task 3
The documentation requires a field which will contain the address and phone number, yet in the
database, this information is in separate fields (cells). What formula is inserted into cell D2? What
formula is inserted in cell E2:………………..
A
Street
1
ul.Krótka 1
2
ul.Krótka 2
3
ul.Krótka 3
4
ul.Krótka 4
5
B
Zip code and
place
12-200
Markowo
13-300
Maćkowo
12-200
Markowo
12-200
Markowo
C
Telephone
D
Home address and telephone
609668688 ul.Krótka 1; 12-200 Markowo; 609668688
603856338
608550068
886805859
Task 4
To issue certificates (mail merge) are required certificate numbers.
Assumed that the number of the certificate will include: group name (in capital letters), serial
number, no action (2.1) and year of publication (2012). How to create a full certificate number?
1
2
3
6
7
A
B
Type Consecutive number
of certificate
iso2
128
iso2
129
kp1
132
kp1
133
C
Full number of
certificate
ISO2/128/2.1/2006
Summary
This study only shows examples of text features. I encourage you to look for inspiration and
interesting solutions in support for Excel and the Internet.
Bibliography
1. Matthew MacDonald: Excel. The Missing Manual, Prentice Hall 2005/07.
2. Matthew MacDonald: Office 2010 PL. The Missing Manual, Prentice Hall 2011/05.
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego
S t r o n a | 11
Nauki ścisłe priorytetem społeczeństwa opartego na wiedzy
Artykuły na platformę CMS
Netography
1. Text functions, Microsoft Home Office, http://office.microsoft.com/pl-pl/excelhelp/funkcje-tekstowe-HP010079191.aspx
2. Excel: łączymy różne dane w jednej komórce, Komputer Świat,
http://www.komputerswiat.pl/poradniki/programy/excel/2011/03/laczymy-rozne-danew%C2%A0jednej-komorce.aspx
3. TEXT-function, Microsoft Home Office, http://office.microsoft.com/pl-pl/excel-help/tekstfunkcja-HP010062580.aspx
Extras
Sheets with examples discussed in the article.
Projekt współfinansowany przez Unię Europejską
w ramach Europejskiego Funduszu Społecznego

Podobne dokumenty