PC Review


Reply
Thread Tools Rate Thread

Data Validation

 
 
Eva Shanley
Guest
Posts: n/a
 
      30th Jun 2003
I have a list of names typed in capital letters that I'm
using in data validation to restrict entries. However, a
user can type a name from the list in lower case letters
(instead of selecting from the drop-down list), and the
lower case will be accepted. Is there a way to restrict
to upper case only? Thanks for any help!
 
Reply With Quote
 
 
 
 
J.E. McGimpsey
Guest
Posts: n/a
 
      30th Jun 2003
First, is there really a problem with entering lower case? Some
specifications call for all upper, but they tend to be much less
readable. Very few XL functions are case sensitive, and for those
that are, you can wrap cell references in Upper() to coerce the text
to upper case.

That said, one way to restrict entries to upper case is to use a
Worksheet_Change event macro. Put this in the worksheet code module
(right-click on the worksheet tab, choose View Code, paste the code
in the window that opens, then click the XL icon on the toolbar to
return to XL):

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Address(False, False) = "A1" Then
Application.EnableEvents = False
Target.Value = UCase(Target.Value)
Application.EnableEvents = True
End If
End Sub


In article <06a601c33f17$db793fa0$(E-Mail Removed)>,
"Eva Shanley" <(E-Mail Removed)> wrote:

> I have a list of names typed in capital letters that I'm
> using in data validation to restrict entries. However, a
> user can type a name from the list in lower case letters
> (instead of selecting from the drop-down list), and the
> lower case will be accepted. Is there a way to restrict
> to upper case only? Thanks for any help!

 
Reply With Quote
 
 
 
 
Debra Dalgleish
Guest
Posts: n/a
 
      30th Jun 2003
Another option, if the list is short, is to type the entries in the Data
Validation Source box. For example: JAN,FEB,MAR

This will restrict the entries to an exact match to list items.

Eva Shanley wrote:
> I have a list of names typed in capital letters that I'm
> using in data validation to restrict entries. However, a
> user can type a name from the list in lower case letters
> (instead of selecting from the drop-down list), and the
> lower case will be accepted. Is there a way to restrict
> to upper case only? Thanks for any help!



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Reply With Quote
 
J.E. McGimpsey
Guest
Posts: n/a
 
      30th Jun 2003
Note that if you do this, you should somewhere (like in the Error
Alert) indicate that case matters - it's probably not intuitively
obvious to most people why "Jan" is invalid when JAN is on the list.

In article <(E-Mail Removed)>,
Debra Dalgleish <(E-Mail Removed)> wrote:

> Another option, if the list is short, is to type the entries in the Data
> Validation Source box. For example: JAN,FEB,MAR
>
> This will restrict the entries to an exact match to list items.

 
Reply With Quote
 
Debra Dalgleish
Guest
Posts: n/a
 
      30th Jun 2003
Ahhh, J.E., you take all the fun out of spreadsheet design!

J.E. McGimpsey wrote:
> Note that if you do this, you should somewhere (like in the Error
> Alert) indicate that case matters - it's probably not intuitively
> obvious to most people why "Jan" is invalid when JAN is on the list.
>
> In article <(E-Mail Removed)>,
> Debra Dalgleish <(E-Mail Removed)> wrote:
>
>
>>Another option, if the list is short, is to type the entries in the Data
>>Validation Source box. For example: JAN,FEB,MAR
>>
>>This will restrict the entries to an exact match to list items.

>



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

 
Reply With Quote
 
Eva Shanley
Guest
Posts: n/a
 
      30th Jun 2003
Thanks to both Debra and J.E. for your solutions. I ended
up using Debra's because the list was short; also I'm a
bit thick when it comes to VB and I could not get the code
to work right. It was important these entries be upper
case because the worksheet will create a .txt file that
feeds another program that does care about upper case.
Thanks again.

>-----Original Message-----
>Note that if you do this, you should somewhere (like in

the Error
>Alert) indicate that case matters - it's probably not

intuitively
>obvious to most people why "Jan" is invalid when JAN is

on the list.
>
>In article <(E-Mail Removed)>,
> Debra Dalgleish <(E-Mail Removed)> wrote:
>
>> Another option, if the list is short, is to type the

entries in the Data
>> Validation Source box. For example: JAN,FEB,MAR
>>
>> This will restrict the entries to an exact match to

list items.
>.
>

 
Reply With Quote
 
J.E. McGimpsey
Guest
Posts: n/a
 
      30th Jun 2003
In article <(E-Mail Removed)>,
Debra Dalgleish <(E-Mail Removed)> wrote:

> Ahhh, J.E., you take all the fun out of spreadsheet design!


Gee, that's not what the principal of my son's school says about the
enrollment, budget and cash flow models I developed for her (I'm a
director of the school's board). She has *days* of fun every quarter
or so!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
custom data validation on cells with data validation values AKrobbins Microsoft Excel Worksheet Functions 2 21st Jun 2011 04:20 PM
Data validation on data validation function Peter Microsoft Excel Misc 1 22nd Sep 2009 10:56 PM
Data Validation based on first, second or third data validation li =?Utf-8?B?U3V6YW5uZQ==?= Microsoft Excel Programming 2 5th Nov 2007 02:48 PM
How to use data validation - Custom validation 0-0 Wai Wai ^-^ Microsoft Excel Discussion 1 7th May 2004 09:04 PM
When pasting data into a column with data validation I lose validation check Brad Microsoft Excel Misc 5 17th Apr 2004 01:11 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 PM.