Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Data Validation - does it carry over to form created via Excel not VBA Editor?

Posted on 2014-01-27
8
Medium Priority
?
409 Views
Last Modified: 2014-01-31
Been asked some questions about form creation. I have someone who wants her data entered in a particular way. e.g dates only to be entered in a certain way etc. So assuming that is set up via Data Validation - does that carry over to a form entered instantly (via the Form icon in New Excel) .
Or would she be better off creating it via User Forms in VBA Editor (bearing in mind she has no VBA experience?
Thanks as always..
0
Comment
Question by:agwalsh
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 668 total points
ID: 39811698
Data Validation (via the button in the Data Tools group on the Data tab) is independent of VBA as User forms.

If the requirements can be met with this, then go for that.  Only use VBA if the need is very complex.

If a new workbook is created from the original, then any such validation and also any VBA in the original will be carried over to the new one.
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1332 total points
ID: 39811712
I don't believe Graham's answer addresses your question.

You have a list of data which includes a date field which has Data Validation (DV) set to allow only entry of a date.

You have implemented the standard built in Form option for ease of entering new data and want to know if the DV is included on the Form.

Strictly speaking the answer is no. However, if the column of data for the dates already has the DV set then the entry from the form input will be rejected if it isn't a valid date.

Therefore, the way round is to ensure that the DV settings are continued down the column beyond the existing entry.

Thanks
Rob H
0
 

Author Comment

by:agwalsh
ID: 39811786
OK, so the answer is that Yes, the form can be implemented and yes the data validation will carry over - as long as it's copied down for as many rows as the user thinks data entry will be required. Will the input messages/error alerts still work?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 33

Expert Comment

by:Rob Henson
ID: 39811799
Input Messages - no I don't believe so.

Error Messages - Yes they still show, the form is trying to "pass" an entry to the sheet and if that entry is invalid then the error message will be triggered.

Thanks
Rob H
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 39811810
I'm less sure that I fully understand your question, but to be specific, any UserForms and their code will carry over when whole new workbook is created from the original.

Copying and pasting areas of a sheet won't copy user forms, but any data validation in the copied cells will be copied via a copy and standard paste.
0
 

Author Comment

by:agwalsh
ID: 39811841
So here's what I'm thinking..
someone has a spreadsheet set up - complete with headings etc.
Data Validation is applied to a range underneath those headings.
To facilitate data entry a form is created (using the Forms icon from the QAT) - is it true to say that the data validation settings will carry over to that form complete with error messages e.g. "this entry is a duplicate - please enter a unique value" sort of thing...?? thanks
0
 
LVL 33

Accepted Solution

by:
Rob Henson earned 1332 total points
ID: 39811851
Graham,

User is using the Standard Data form not a User Form and is not creating a new file only entering new data into an existing list.

Form icon is not visible in default Data Toolbar but I have just added it through the Customise ribbon options.

To get the form to show without the button, the old fashioned keyboard shortcut is "Alt+D+O" when cursor is in the data list. It creates a simple input form using the header row as field names and the sheet name as the Form name.

Question is, when using this form does the Data Validation on the sheet get applied to the entries via the form. The answer is yes, the form tries to pass an entry to a DV restricted field so the entry has to match the DV requirements.

For the input message, if the cursor is in a cell which has the DV rule set, the input message will show. This message stays visble when the form appears.

Thanks
RH

EDIT to last line:

...if the cursor is in a cell which has the DV rule set, prior to the Form being invoked,
0
 

Author Closing Comment

by:agwalsh
ID: 39823366
Did the job...thank you :-)
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My attempt to use PowerShell and other great resources found online to simplify the deployment of Office 365 ProPlus client components to any workstation that needs it, regardless of existing Office components that may be needing attention.
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question