FormulaCraft

How to restrict cell input to numbers only in Excel and Google Sheets

Excel & Google Sheets
=ISNUMBER(A2)

Verified example

Computed by a real spreadsheet engine on the sample data below.

InputValidation Result
123=ISNUMBER(A2)
abc=ISNUMBER(A3)
45.67=ISNUMBER(A4)

=ISNUMBER(A2)TRUE

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Select the cell or range of cells where you want to restrict input to numbers.
  2. 2In Excel, go to Data > Data Tools > Data Validation. In Google Sheets, click Data > Data validation.
  3. 3Set the criteria to 'Number'.
  4. 4Choose the condition type such as 'is number', 'is greater than', etc., based on your needs.
  5. 5Click OK to apply the restriction.

Tips

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Can I restrict input to integers only?

Yes, in the Data Validation settings, choose 'Whole number' instead of 'Number'.

What happens if someone tries to enter invalid data?

A warning message will appear, preventing the entry of invalid data.

Is this feature available in older versions of Excel?

Data Validation is available in most versions of Excel, but features may vary slightly.

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: