# Text variables

## Create a text variable selection

Text variables are items which contain textual data such as address lines, surname, forename, company name etc. You can identify them in the **System** explorer because they have an **ABC** icon to the left of the variable name.

You can make a selection on a text variable within FastStats as follows:-

Create a new selection either by:

- Clicking on the **Selection** icon in the **Toolbox**
- Dragging the Selection tool from the Toolbox onto the FastStats workspace
- Dragging the **Text** variable to use in the selection directly from the System explorer onto the FastStats workspace

If you used the first or second method above to create a new selection you will have a blank selection window similar to the one below.

If necessary, set the resolve table. See [Change the counting table](<https://help.apteco.com/en/faststats/analysis/selections/change-counting-table/index.md>).

With the first and second methods:

1. Drag and drop the Text variable to use - e.g. **Surname** - onto the New Selection window.

   The default is to find an **Exact Match** with the text you enter into the freeform text panel.
2. If required, specify other criteria on separate lines.

   > **Note**
   >
   > You can change the **Match Case** option depending on how you want to match the strings.
3. Click on the **Match case** drop-down to change from **Exact Match** to one of the other matching types, such as **Contains**, **Ranges and Wildcards**, **Begins With** and **Ends With**.

The **Ranges and Wildcards** option provides further flexibility. You can use the wildcards `*` and `?` to identify part text, unknown characters, or spaces. The following example returns surnames that are six characters in length and start with "Wa":

A data grid can help you to sense and sanity check your results:

For more on data grids, see [Data grid](<https://help.apteco.com/en/faststats/visualisation/data-grid/index.md>).
