Function Problems

Fix the Excel Create Names from Selection Error

Chanuka GeekiyanageChanuka Geekiyanage Nov 20, 2026 868 views

Question details

The user needs to create defined names from labels in an Excel range without receiving a selection error.

Fix the Excel Create Names from Selection Error
Product
Microsoft Excel
Device & OS
not provided
Scenario
Creating defined names from a selected range that contains labels and related data.
Observed behavior
Excel displays “This selection isn't valid,” even though the selected range appears correct.
Before you start

Identify the cells containing the labels and the data each name should refer to. Check whether the labels are in the top row, bottom row, left column, or right column of one continuous range.

Solution 1Recommended

Check the range and label positions in Excel

Use this procedure when Excel rejects a selection while creating names from labels.

1
Select labels and data

On the worksheet, drag to select one continuous rectangular range that includes both the labels and the data to be named. For example, select A1:B5 if A1 and B1 are column labels and the data is below them.

2
Open the command

Go to Formulas > Create from Selection. In the dialog, select the label location that matches your range, such as Top row, and clear locations that do not contain labels.

3
Create and inspect the names

Click OK, then open Formulas > Name Manager. Check that each created name refers to the intended data range.

4
Correct labels and retry

If the error remains, check the selected edge for blank or unsuitable labels. Edit labels to use distinct names that start with a letter or underscore, contain no spaces, and do not look like cell references, such as A1. Select the range again and retry Formulas > Create from Selection.

Check the range and label positions in Excel
Check existing names: Use Formulas > Name Manager to review existing names and their scopes if a label conflicts with a name already in the workbook.
Create named ranges in WPS

Create named ranges manually in WPS Spreadsheets

If you need named ranges for your data, use the Name Box in WPS Spreadsheets to define them individually without relying on Excel's Create from Selection command.

  1. 1. Open the workbook: Open WPS Spreadsheets, select Open, and choose your Excel workbook.
  2. 2. Select the data: On the worksheet, select the cells you want the first name to refer to, excluding the label cell.
  3. 3. Enter a name: Click the Name Box to the left of the formula bar, type a valid name such as Sales_Total, and press Enter.
  4. 4. Repeat and save: Repeat the selection and naming process for each range, then choose File > Save or Save As to save the workbook.
Create named ranges for labeled data individuallyOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Should I include the header cells in the Excel selection?

Yes. Select the labels together with their related data, then choose the matching label position in Formulas > Create from Selection.

What if my labels are in the left column instead of the top row?

Select the labels and data as one range, open Formulas > Create from Selection, and select Left column in the dialog.

How can I check what a defined name refers to?

In Excel, open Formulas > Name Manager and inspect the Refers to field for the name.

Can I create a name without Create from Selection?

Yes. Select the data cells, click the Name Box to the left of the formula bar, enter a valid name, and press Enter.