- Minitab Cookbook
- Isaac Newton
- 418字
- 2021-07-16 12:29:21
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:

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:
- In the Calc menu, click on Calculator.
- In the section Store result in variable, create a new column called
Surname
. - 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. - Next, find the function
Word
in the text function list. Double-click on this to highlight and replace the sectiontext
in the calculator. This should look like the following screenshot: - Double-click on the column
Volunteer
to bring it into the expression and replace the section labeled text. - Replace
word_num
with2
and delete the delimiters and brackets. The expression should look like the following screenshot: - Click on OK to create a column of surnames capitalized correctly.
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.
- 中國國民經濟核算體系修訂問題研究
- Microsoft Dynamics GP 2016 Cookbook
- 新中國審計制度變遷
- 審計學
- VMware vCloud Director Essentials
- 注冊會計師全國統一考試專用教材:審計
- EViews10.0的應用與計量分析
- 大數據搜索與挖掘及可視化管理方案 :Elastic Stack 5:Elasticsearch、Logstash、Kibana、X-Pack、Beats (第3版)
- 審計基礎
- OAuth 2.0 Identity and Access Management Patterns
- 振蕩指標MACD:波段操作精解(升級版)
- Microsoft Dynamics NAV
- 項目管理實務(第二版)
- 中國國內生產總值核算問題研究
- 內審人員進階之道:內部審計操作實務與案例解析