Solved

Data Validation in Excel 2007

Posted on 2011-02-22
6
242 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
[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
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

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.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
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…

623 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