Solved

Data Validation in Excel 2007

Posted on 2011-02-22
6
229 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

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

Join & Write a Comment

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…
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.

747 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

11 Experts available now in Live!

Get 1:1 Help Now