Solved

Data Validation in Excel 2007

Posted on 2011-02-22
6
234 Views
Last Modified: 2012-05-11
Hi,

Is it possible to do a custom data validation if the values in the cells for that particular field alternate?

For example, my organization works with 3 different groups, so each group has its own acryonm, which I know will be consistent. For example, the groups are called KORD, CIDKP-C, and CIDKP-S. However, in the cells for this field, II also want to include the date of each transaction and keep track of each transaction with an ID number. So it will be CIDKP-C 2011-01, CIDKP-C 2011-02, etc... or KORD 2011-01, KORD 2011-02 etc..., or CIDKP-S 2011-01, CIDKP-S 2011-02, etc....

Is it possible to set a field for data validation with such criteria?

thanks,
carlynne
0
Comment
Question by:Carlynne
  • 4
  • 2
6 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 34958518
Assuming your group is in cell A1 then use this custom validation formula:

=LEFT(B1,LEN(A1))=A1

Kevin
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 34958541
Do you need assistance setting up the custom validation formula?

Kevin
0
 

Author Comment

by:Carlynne
ID: 34958596
Hi Kevin,

Thanks very much for your quick response. II can find my way to setting up custom validation by selecting column > data> data validation. Then the data validation box opens, and I use the drop down menu to select custom. Correct?

I entered the code you provided, and then I tried to enter CIDKP-C 2011-01, but Excel says that the value I entered is not valid.

thanks,
carlynne
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 34958641
>Then the data validation box opens, and I use the drop down menu to select custom. Correct?

Correct.

When defining the custom validation formula, you have to select the cell for which the validation rule is intended and use that cell as the reference as well as the cell in the same row that contains the group code.

For example, if setting up the rule for cell B2 and the group code is in cell A2, select B2, open the validation dialog box, and use this formula:

=LEFT(B2,LEN(A2))=A2

Kevin
0
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 250 total points
ID: 34958645
Also, ensure that the value enter in cell A2 is indeed that same text that prefixes the rest of the value being entered in cell B2.

Kevin
0
 

Author Closing Comment

by:Carlynne
ID: 34959874
thanks!
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

830 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