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

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.

主站蜘蛛池模板: 五河县| 南木林县| 龙州县| 上高县| 阳城县| 霍林郭勒市| 蒙阴县| 青田县| 林口县| 曲周县| 礼泉县| 中方县| 卓资县| 贞丰县| 宁德市| 崇信县| 临邑县| 巴林右旗| 合川市| 蓬莱市| 巍山| 普宁市| 嘉定区| 石河子市| 珠海市| 阜宁县| 科技| 赣州市| 年辖:市辖区| 枞阳县| 江安县| 昭通市| 尉犁县| 克东县| 鱼台县| 大余县| 淮南市| 闽清县| 桃江县| 江孜县| 和林格尔县|