Is there a way to do data validation to prevent text entry in a cell without using a macro? We also want to be able to copy data into the spreadsheet with the data validation.
Is there a way to do data validation to prevent text entry in a cell without using a macro? We also want to be able to copy data into the spreadsheet with the data validation.
Data Validation can be done w/o a macro by using the menu: Data>Data Tools>Data Validation to restrict manual entries to validated cells to the values you permit. However, this will not work for entries that are copied and then pasted to the validated cells. The latter scenario will require a macro solution.
Here's one way . . .
Data Validation
Settings
Allow
Custom
Formula
=isnumber(a1)
This will allow you to type numbers into a1, but not text values.
Note, data validation does NOT stop you pasting invalid entries into the cell - in this example you could still paste a text string into the cell.
We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel
Which adblocker are you using?
Disable AdBlock
Follow these easy steps to disable AdBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the icon in the browser’s toolbar. 2)Click on the "Pause on this site" option.
Go back
Disable AdBlock Plus
Follow these easy steps to disable AdBlock Plus
1)Click on the icon in the browser’s toolbar. 2)Click on the toggle to disable it for "mrexcel.com".
Go back
Disable uBlock Origin
Follow these easy steps to disable uBlock Origin
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.
Go back
Disable uBlock
Follow these easy steps to disable uBlock
1)Click on the icon in the browser’s toolbar. 2)Click on the "Power" button. 3)Click on the "Refresh" button.