Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Validation for state abbreviations

How can I set up data validation so that state abbreviations are entered as
two upper case characters?

I have the abbreviations validated from a list, but it doesn't force all
uppercase.

Dick King
  #2   Report Post  
Posted to microsoft.public.excel.misc
Red Red is offline
external usenet poster
 
Posts: 48
Default Validation for state abbreviations

hmmm.

I tried creating a dummy validation (aka, not a complete listing of state
abbreviations) and mine worked just fine. I pointed the validation to the
list I created (which were entered as CAPS) and therefore my drop down list
for the validation cell was populated with all caps. I tried overwriting
the cell with just lowercase inputs and I got the expected error message.
Did you make your list in all caps?


--
Just a fellow Excel user here to help when I can.....


"k1ngr" wrote:

How can I set up data validation so that state abbreviations are entered as
two upper case characters?

I have the abbreviations validated from a list, but it doesn't force all
uppercase.

Dick King

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Validation for state abbreviations

This event code will change the entries to Upper Case when selected from the DV
list.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code".

Adjust the "A1" to your DV cell address.

If more than one cell has DV list alter to Me.Range("A1, B21, C13, D1")

Copy/paste into that sheet module. Alt + q to return to the Excel sheet window.


Gord Dibben MS Excel MVP

On Fri, 29 Feb 2008 11:11:02 -0800, k1ngr
wrote:

How can I set up data validation so that state abbreviations are entered as
two upper case characters?

I have the abbreviations validated from a list, but it doesn't force all
uppercase.

Dick King


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert State abbreviations color coded cell exceluser Excel Worksheet Functions 9 December 27th 07 10:03 PM
state abbreviations gls858 New Users to Excel 7 June 20th 07 09:34 PM
Converting State Names to State Abbreviations aznate Excel Discussion (Misc queries) 1 October 20th 06 06:52 AM
create a list box in one cell of state abbreviations spitcher Excel Worksheet Functions 1 March 27th 06 11:01 AM
US State Abbreviations List DTTODGG New Users to Excel 1 November 16th 05 01:36 PM


All times are GMT +1. The time now is 09:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"