Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JWF
 
Posts: n/a
Default Upper case only entries

Hi - happy new year to one and all from Jane in Portbury, near Bristol,
England.

I have XP with Office 2000, is there any way to ensure entries into a column
appear as upper case only. The entries are Y, N or N/A but I need this to
only be upper case only, and as always you can request this, but it is not
always so.

Thanks if you can help.
xJane
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Upper case only entries

One way

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Long
Dim nCount As Long
Dim nMax As Long

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Column = 2 Then
With Target
.Value = UCase(.Value)
If .Value < "Y" And .Value < "N" And .Value < "N/A" Then
.Value = ""
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.





--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"JWF" wrote in message
...
Hi - happy new year to one and all from Jane in Portbury, near Bristol,
England.

I have XP with Office 2000, is there any way to ensure entries into a

column
appear as upper case only. The entries are Y, N or N/A but I need this to
only be upper case only, and as always you can request this, but it is not
always so.

Thanks if you can help.
xJane



  #3   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier
 
Posts: n/a
Default Upper case only entries

Hi Jane
As an alternative to Bob's code solution, (but not as robust), you could
use Data Validation.
Mark the group of cells where entries are to take place.
DataValidationuse dropdown to select List in the white pane marked
Allow enter Y,N,N/A
You can choose whether or not you want this to appear as a dropdown
choice in the cell.
On the Error Alert Tab, type a message to say "You may only enter
uppercase values Y or N or N/A"

You could also repeat this on the .Input Message tab if you want, and
the user's will see it as they hover over the cell.

--
Regards

Roger Govier



JWF wrote:
Hi - happy new year to one and all from Jane in Portbury, near
Bristol, England.

I have XP with Office 2000, is there any way to ensure entries into a
column appear as upper case only. The entries are Y, N or N/A but I
need this to only be upper case only, and as always you can request
this, but it is not always so.

Thanks if you can help.
xJane



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
I NEED HELP with the SPELLNUMBER Function vag Excel Worksheet Functions 0 June 21st 05 08:17 AM
EXCEL:NUMBER TO GREEK WORDS vag Excel Worksheet Functions 1 June 15th 05 05:57 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM
Is there a formula to spell out a number in excel? Sha-nay-nay Excel Worksheet Functions 2 December 18th 04 09:25 PM
Convert Numeric into Text Monty Excel Worksheet Functions 0 December 18th 04 09:25 PM


All times are GMT +1. The time now is 10:58 PM.

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

About Us

"It's about Microsoft Excel"