Link to home
Start Free TrialLog in
Avatar of Marc Chevalier
Marc ChevalierFlag for United States of America

asked on

Excel 365 cell needs initial value of blank, but can only have a value of 'Y' or 'N'.

I have a working Excel 365 spreadsheet, type xlsm, that I need to add a cell to.  This spreadsheet is used for entry purposes and incorporates much VB for applications.  I need to add a field that will be limited to field values of 'Y' or 'N' and will provide an error message when an invalid value is entered.  This is basic using the Data Validation button in Excel.  My problem arises since I need this field to have an INITIAL value of blank or space.  I do initialize the field in the VB code upon opening the spreadsheet to a value of " ".  This also works yet once the spreadsheet is opened, it does not force the user to enter either a 'Y' or 'N' in the field.  It will only give an error message if another value is entered into the field.  So, it can be printed or saved with a blank in the field even though it restricts ENTRY to 'Y' or 'N'.  Does anybody know a way around this.  So I can have the spreadsheet open up with no value in the field but still force them to enter a 'Y' or 'N' before printing or saving?  Thank you very much!
ASKER CERTIFIED SOLUTION
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial