#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Forcing an entry

I swear I've done it before, but I can't remember how.

Can't I force a cell to take a Y or N as opposed to a number (or any
other character, for that matter)? Also, can I guarantee that the Y or
N is capitolized?

Thank you.

Chip

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Forcing an entry

Select Data - Validation - List and in the source place Y, N. The default
for the error alert is Stop which will only allow Capial Y or N...
--
HTH...

Jim Thomlinson


" wrote:

I swear I've done it before, but I can't remember how.

Can't I force a cell to take a Y or N as opposed to a number (or any
other character, for that matter)? Also, can I guarantee that the Y or
N is capitolized?

Thank you.

Chip


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 30
Default Forcing an entry

Jim, thanks for this. I got it to work. This kind of dummy-proofs the
cell so that only a capitol Y or N can be used, especially when I use
the Input Message or Error Alert.

Let's assume that the range D1:D100 clearly needed a Y or N. No other
option would make sense to the user. If a user enters a lower case y,
is there a way that once he hits enter it gets changed to a capitol
letter? I know I can use =UPPER(D1:D100), but that only works in a
different column.

Chip


Jim Thomlinson wrote:
Select Data - Validation - List and in the source place Y, N. The default
for the error alert is Stop which will only allow Capial Y or N...
--
HTH...

Jim Thomlinson


" wrote:

I swear I've done it before, but I can't remember how.

Can't I force a cell to take a Y or N as opposed to a number (or any
other character, for that matter)? Also, can I guarantee that the Y or
N is capitolized?

Thank you.

Chip



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Forcing an entry

If you are using a DV dropdown box on every cell there would be no need for any
change because the user is seleting from the DV dropdown.

If the range D1:D100 "clearly" makes sense that a Y or N is to be entered you
could use event code.

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

This is sheet event code.

Right-click on the sheet tab and copy/paste into that module.

ALT + q to go back to your worksheet

Type in a lower case "y" and will become upper case.


Gord Dibben MS Excel MVP

On 19 Oct 2006 13:36:48 -0700, " wrote:

Jim, thanks for this. I got it to work. This kind of dummy-proofs the
cell so that only a capitol Y or N can be used, especially when I use
the Input Message or Error Alert.

Let's assume that the range D1:D100 clearly needed a Y or N. No other
option would make sense to the user. If a user enters a lower case y,
is there a way that once he hits enter it gets changed to a capitol
letter? I know I can use =UPPER(D1:D100), but that only works in a
different column.

Chip


Jim Thomlinson wrote:
Select Data - Validation - List and in the source place Y, N. The default
for the error alert is Stop which will only allow Capial Y or N...
--
HTH...

Jim Thomlinson


" wrote:

I swear I've done it before, but I can't remember how.

Can't I force a cell to take a Y or N as opposed to a number (or any
other character, for that matter)? Also, can I guarantee that the Y or
N is capitolized?

Thank you.

Chip



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
Mileage Claim Formula johndavies New Users to Excel 4 August 14th 06 09:24 AM
How do I compare the entry in one cell against all other cells Micki Excel Discussion (Misc queries) 1 February 10th 06 02:46 AM
Checking & Forcing Data Entry in Cells robertguy Excel Discussion (Misc queries) 1 January 23rd 06 06:01 PM
limit text entry in a range of cells QTPRM Excel Discussion (Misc queries) 2 May 25th 05 03:52 AM
Forcing Combo box entry in VBA Anthony Slater Excel Discussion (Misc queries) 1 December 1st 04 03:09 PM


All times are GMT +1. The time now is 05:39 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"