Preparing a Worksheet


Frequently, you use worksheets that are already created for you. However, sometimes you must enter or import data into a Minitab worksheet before you start an analysis.

You can enter data in a Minitab worksheet in the following ways:
  • Type the data directly into the worksheet.
  • Copy and paste the data from other applications.
  • Import the data from Microsoft Excel files or text files.

After your data are in Minitab, you might need to edit cells or reorganize columns and rows to prepare the data for analysis. Some common manipulations are stacking, subsetting, specifying column names, and editing data values.

In this chapter, you import data into Minitab from different sources. You also learn how ShippingData.MTW was prepared for analysis.

Get data from different sources

For the initial analyses in Getting Started with Minitab 17, the worksheet ShippingData.MTW, which contains data from three shipping centers, is already set up. However, the three shipping centers originally stored the shipping data in the following ways:
  • The Eastern shipping center stored data in a Minitab worksheet.
  • The Central shipping center stored data in a Microsoft Excel file.
  • The Western shipping center stored data in a text file.

To analyze all the shipping data, open each file in Minitab, then stack the files into one worksheet.

Open a worksheet

Start with the data from the Eastern shipping center.

  1. If you are continuing from the previous chapter, choose File > New > Project. If not, start Minitab.
  2. Choose Help > Sample Data.
  3. Double-click the Getting Started folder, then double-click Eastern.MTW.

Open an Excel file

The Central shipping center data are in an Excel spreadsheet. You can open Excel files in Minitab.

  1. Choose File > Open.
  2. Double-click Central.xlsx.
  3. Click OK.

Open a text file

The Western shipping center data was in a text file. You can open text files in Minitab.

  1. Choose File > Open.
  2. Double-click Western.txt.
  3. Click OK.

Combine the data into one worksheet

Notice that the worksheets for the shipping centers have the same column names. To make the data easier to analyze, you need to combine the data into one worksheet by stacking columns that have the same names. You can move data by copying and pasting or by using commands on the Data menu.

  1. Choose Data > Stack Worksheets.
  2. From Stack option, select Stack worksheets in a new worksheet.
  3. Use the arrow buttons to move the three worksheets from Available worksheets to Worksheets to stack.
  4. In New worksheet name, enter MyShippingData.
  5. Click OK.

Move and rename a column

The Source column contains the labels that identify data from the shipping centers. Move the Source column to C1, and rename the column Center.

  1. Click in the Source column, then choose Editor > Move Columns.
  2. Under Move Selected Columns, select Before column C1.
  3. Click OK.
  4. Click in the column name cell Source, type Center, and press Enter.

Prepare the worksheet for analysis

The data are now in a single worksheet, but you still need to manipulate the data in the following ways:
  • Recode data
  • Add a new column
  • Create a column of calculated values

For a complete list of the data manipulations that are available in Minitab, go to Data menu in the Minitab Help index. To access the Minitab Help index, open Minitab, choose Help > Help, then click the Index tab in the left pane.

Recode the data

Some of the labels in the Center column include a file extension. Recode the labels to remove the file extension.

  1. Choose Data > Recode > To Text.
  2. In Recode values in the following columns, enter Center.
  3. From Method, select Recode individual values.
  4. Under Recoded value, replace Eastern.MTW with Eastern.
  5. Under Recoded value, replace Western.txt with Western.
  6. From Storage location for the recoded columns, select In the original columns.
  7. Click OK.

The labels in the Center column are now Eastern, Central, and Western.

Calculate difference values

Before you save your new worksheet and perform analyses, you need to calculate the number of days that elapsed between order dates and delivery dates. You can use Minitab’s Calculator to assign a formula to a column to calculate these values. If you change or add data, the calculated values are automatically updated.

Insert a column

Insert a column between Arrival and Status.

  1. Click any cell in C4 to make that column active.
  2. Right-click, then choose Insert Columns.
  3. Click in the name cell of C4. Type Days, then press Enter.

Assign a formula to a column

Use Minitab’s Calculator to perform basic arithmetic or mathematical functions. Minitab stores the results in a column or a constant. You can assign a formula to a column so that the calculated values update automatically if the data change.

Calculate the delivery time and store the values in the Days column.

  1. Choose Calc > Calculator.
  2. In Store result in variable, enter Days.
  3. In Expression, enter Arrival - Order.
  4. Select Assign as a formula.
  5. Click OK.

You can also add a formula to a column by selecting the column and choosing Editor > Formulas > Assign Formula to Column.


For more information on formulas in columns, go to Formulas in the Minitab Help index. For more information on Minitab’s Calculator and the available operations and functions, go to Calculator in the Minitab Help index. To access the Minitab Help index, open Minitab, choose Help > Help, then click the Index tab in the left pane.

Examine the worksheet

The Days column contains the calculated values that represent delivery time. These values are expressed in number of days. When you assign a formula to a column, a status indicator appears in the upper right corner of the column heading on the worksheet. This indicator specifies whether the formula is properly defined and whether the data need to be updated by re-calculating the values. A green check mark indicates the data are up-to-date.


Hold the pointer over the status indicator to view the formula assigned to the column. Double-click the status indicator to edit the formula.

Update the worksheet

Suppose you learn that the arrival date for a shipment in the Central shipping region is incorrect. If you correct the date in the worksheet, Minitab automatically updates the Days column.

Update the arrival date in row 127.

  1. In the Arrival column, double-click row 127 to put it into edit mode. Change 3/7/2013 to 3/8/2013.
  2. Press Enter.
Minitab automatically updates the value in the Days column from 2.98125 to 3.98125.
Original worksheet
Updated worksheet

If you prefer to update formulas manually, then choose Editor > Formulas > Calculate All Formulas Automatically to deselect this option. If values in the worksheet change and cause the formula in a column to be out of date, the status indicator for that column changes to a yellow triangle. Choose Editor > Formulas > Calculate All Formulas Now to update all formulas in the project.

Save the worksheet

Save all your work in a Minitab worksheet.

  1. Click in the worksheet, then choose File > Save Worksheet As.
  2. Browse to the folder that you want to save your files in.
  3. In File name, enter MyShippingData.
  4. From Save as type, select Minitab.
  5. Click Save.

In the next chapter

The shipping center data from several sources are in Minitab and are set up properly for analysis. In the next chapter, you adjust Minitab default settings to make future analyses easier.

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy