Solved

Data Validation in Excel 2007

Posted on 2011-02-22
6
232 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

943 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

4 Experts available now in Live!

Get 1:1 Help Now