Keywords: Input Validation, Range, OnEntry, Data Entry
Description: Excel's OnEntry property provides a way to validate data entered in a worksheet cell.
Tip: You can set a worksheet's OnEntry property in an Auto_Open macro. When data is entered in a cell on the worksheet, the macro specified in the OnEntry property will run. If the data is not valid, the OnEntry procedure will display a message box and set an error message next to the invalid data.
Guide to the Example: Enter a value in cell B2 of the worksheet. If the value is less than 0 or greater than 100, an error message will be displayed in a message box and the value will be marked as an Error in column C.
Download File: Click Here
Tip: Click on the link above and choose
"Save" to download the xls workbook to your hard drive or "Open" to
open the workbook inside of your browser.