官术网_书友最值得收藏!

Cleaning up a text column with the calculator

In the dataset shown in the following screenshot, volunteers are listed with their first and last names:

Cleaning up a text column with the calculator

Throughout the column, there are errors in the capitalization of names. We will apply the correct case to the names and separate the names into new columns for first and last name.

Getting ready

Enter the names in the screenshot into a new column in Minitab. Name the column Volunteer.

How to do it…

The following instructions will use the proper word commands in the calculator to create a column of correctly capitalized surnames:

  1. In the Calc menu, click on Calculator.
  2. In the section Store result in variable, create a new column called Surname.
  3. Filter the function list by selecting the text functions from the drop-down list. Then look for the function Proper. Double-click on the function to move it into the calculator.
    How to do it…
  4. Next, find the function Word in the text function list. Double-click on this to highlight and replace the section text in the calculator. This should look like the following screenshot:
    How to do it…
  5. Double-click on the column Volunteer to bring it into the expression and replace the section labeled text.
  6. Replace word_num with 2 and delete the delimiters and brackets. The expression should look like the following screenshot:
    How to do it…
  7. Click on OK to create a column of surnames capitalized correctly.
    How to do it…

How it works…

The text function Proper returns a capital letter at the start of each word. The rest are set to lowercase. The Word function is used to locate a word in a text string. The Word 2 function finds the second word in a cell, using spaces as delimiters by default.

Nesting the Word function inside the Proper command tells Minitab to find the second word for the text in the column Volunteer and then set the first letter in each word as a capital and all others as lowercase.

There's more…

There is a list of calculator functions within the Help menu for the calculator. The text functions include a number of useful tools. Note, Item is similar to the Word function but allows the separator to be specified. For example, A_123_tx could be used with an Item function such as Item(c1,2,"_") to define the separator of the items as an underscore.

It is also worth noting that Find and Replace work in the worksheet as they do in other applications. Press Ctrl + F, and Ctrl + H or they can be found in the Editor menu.

主站蜘蛛池模板: 襄樊市| 三穗县| 屯留县| 高唐县| 政和县| 闽清县| 霞浦县| 永平县| 平南县| 沂水县| 文安县| 河源市| 封丘县| 屏边| 石嘴山市| 兴仁县| 江陵县| 盈江县| 曲周县| 海口市| 五台县| 潢川县| 万全县| 成都市| 西城区| 梁山县| 黎川县| 庄河市| 罗田县| 昌吉市| 通山县| 青州市| 永定县| 清涧县| 桃园县| 凉城县| 时尚| 凌海市| 搜索| 黄平县| 古田县|