Solved

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

Posted on 2014-01-27
8
341 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 167 total points
Comment Utility
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 31

Assisted Solution

by:Rob Henson
Rob Henson earned 333 total points
Comment Utility
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
Comment Utility
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
 
LVL 31

Expert Comment

by:Rob Henson
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 76

Expert Comment

by:GrahamSkan
Comment Utility
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
Comment Utility
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 31

Accepted Solution

by:
Rob Henson earned 333 total points
Comment Utility
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
Comment Utility
Did the job...thank you :-)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Outlook Free & Paid Tools
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now