user2673736
user2673736

Reputation: 9

Null Validation in Excel Column

I need to create a template for internal data collection in MS Excel.

I need to make certain columns mandatory. I have a list of values associated with these columns.

I tried using Data Validation, but could not find any option which throws an error for null values.

How can I define data validation so that null value cannot be inserted in those columns?

Upvotes: 0

Views: 521

Answers (1)

teylyn
teylyn

Reputation: 35935

Please provide more context.

Data validation fires when the user manually enters data into a cell. If a user does not even try to modify a specific cell, its data validation rule will never fire.

If data validation is based on a list and that list (for example defined by a named range) contains blanks, then any value can be entered, even blanks.

If you want to ensure that mandatory fields are filled in before the file can be saved, you need to add a Workbook_BeforeSave event to the workbook's ThisWorkbook module and check the respective cells for valid content.

Upvotes: 2

Related Questions