You are learning Data Validation in MS Excel
How to restrict data entry to only numbers in Excel?

Here are two methods to restrict data entry to only numbers in Excel:
Method 1: Using Data Validation
1. Select the cells: Choose the cell(s) where you want to allow only numeric input.
2. Data Validation: Navigate to the "Data" tab on the Excel ribbon. In the "Data Tools" group, click "Data Validation."
3. Set Allow to "Custom": In the "Settings" tab of the Data Validation window, under "Allow," choose "Custom" from the dropdown menu.
4. Formula for Numbers: In the "Formula" box, enter the formula `=ISNUMBER(A1)`. Replace "A1" with the actual cell address you selected in step 1. This formula checks if the entered value is a number and returns TRUE if it is, allowing the entry.
5. Error Message (Optional): You can customize the error message displayed when someone tries to enter non-numeric data. Click the "Error Alert" tab and set the desired style, title, and error message.
6. Click OK: Click "OK" to close the Data Validation window and activate the restriction.
Method 2: Using Cell Formatting (Limited to Whole Numbers)
1. Select the cells: Choose the cell(s) where you want to allow only numeric input.
2. Number Format: Right-click on the selected cells and choose "Format Cells" from the context menu.
3. Number Tab: In the "Format Cells" window, click on the "Number" tab.
4. Choose a Number Format: Select a number format category (e.g., Number, Currency, Accounting). These formats typically restrict entries to numeric values.
5. Decimals (Optional): You can specify the number of decimal places allowed if you want to restrict to whole numbers, choose "0" decimals.
6. Click OK: Click "OK" to close the "Format Cells" window and apply the format.
Note: While cell formatting restricts most non-numeric entries, it allows pasting text as values. Data Validation offers a more robust approach for all scenarios.