Solved

Data Validation in Excel 2007

Posted on 2011-02-22
6
236 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
Industry Leaders: 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

751 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