Rename_At

Function renames several variables (table columns) at once.

Properties

Prefix String. Text that will be added before the selected variable names.
Suffix String. Text that will be added after the selected variable names
Variables Selection of variables for renaming.

Keywords

Rename Variables at Once, Rename Several Variables, Add Prefix, Add Suffix, Rename At, Rename Each

See Also

Reame, Header_To_Row, Row_To_Header

Video-tutorial

How to Rename Several Excel Columns at Once

Column names editing in Excel spreadsheets is a relatively simple task. Presented function (Rename_At) allows you to make the work more efficient, if you need to edit multiple columns in the same way - add a text string before or after the current column names. An example of use can be found at work with tables of chemical analyzes.

Imagine them stored in the “long-form”, where individual samples are stored in rows and the values of individual components are written in columns. If you want to divide cation and anion components visually, you can insert the “cat_” prefix for cations and “an_” for the anions, before their names. With these prefix / suffix editations, the Rename_At function can help you. The example is shown in the following figure.

In our example, we use a table containing two categorical (Cat_1 and Cat_2) and three numeric (x, y and z) variables.

If you want to edit names of multiple columns at once, use the Rename At button found in the ribbon toolbar tab Variable.

Clicking this button will show the function in the sidebar. If you click on it, the setting options will be displayed in the Properties Panel - Prefix, Suffix and Variables. As Prefix and Suffix you paste the text values. In the Variables list, using the check boxes, you select the variables that you want to rename.

The example is shown in the following illustration. In this case, we have modified two categorical variables (Cat_1 and Cat_2) by adding “_string” value as the suffix. In this way we created new names “Cat_1_string” and “Cat_2_string”.

The next figure shows an example of a more complex adjustments. We have edited the names of three numerical variables - x, y and z. To them we added prefix “num_” and suffix “_0” to create new names - num_x_0, num_y_0 and num_z_0.

Overall, this is a fairly simple function whose functionality we only use in very specific cases. To edit column names manually and individually, use the basic Rename function.