Fix an Invalid Name Error in Excel Structured Reference Formulas
Question details
The user needs a date calculation formula to work on a second worksheet without an invalid name error.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A formula uses the Severity and Date Found columns to add a different number of days based on the severity value.
- Observed behavior
- Excel reports that the syntax of the name is not correct. The user also reported a crash after trying earlier advice.
Check whether the data on the second worksheet is an Excel Table and identify the columns containing severity values and dates. Make sure the dates are recognized by Excel as dates, not text.
Check the Table and Structured Reference Syntax
Use this method if you want the formula to refer to named columns in an Excel Table.
Click a cell in the data range and look for the Table Design tab. If it is not a table, select the range, choose Insert > Table, and confirm that the range includes headers.
Check the table's header row for Severity and Date Found. If the headers differ, either edit them or use their exact names in the formula.
Select a cell in a table column and enter =IF([@Severity]=3,[@[Date Found]]+90,IF([@Severity]>3,[@[Date Found]]+30,[@[Date Found]]+180)) in the cell or formula bar, not the Name Box.
Select the result column and choose Home > Number Format > Short Date if the results appear as numbers.

Use Cell References Instead of Structured References
Use ordinary cell references if the second worksheet is not a table or you prefer not to convert it.
Work With Date Formulas in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and work with date calculations while moving between office suites; check complex workbook features after opening.

Frequently Asked Questions
Why does [@Severity] work on one worksheet but not another?
The first worksheet may contain an Excel Table while the second contains an ordinary range, or the headers may differ. Click the data and look for the Table Design tab, then check the header names.
How do I reference a header with a space in its name?
In a formula entered within the table, enclose the header in an additional pair of brackets. For example, use [@[Date Found]] for the current row's Date Found value.
Why does my date formula return a number?
Excel stores dates as serial numbers. Select the result cells and choose Home > Number Format > Short Date to display them as dates.
What should I check if Excel crashes again?
Reopen Excel and check for available updates under File > Account > Update Options > Update Now, if that option is available. A crash may have a separate cause from the formula error.




