Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Two types of Data Validation in a cell?

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Two types of Data Validation in a cell?

You could just select the 'List' option and type Y,N in the criteria. It is
case sensitive.



"Lakeville" wrote:

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Two types of Data Validation in a cell?

Data Valivation List Source = =$B$1:$B$2
In Cell B1, put Y and in Cell B2, put N


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Lakeville" wrote:

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Two types of Data Validation in a cell?

Try this...

=FIND(A1,"~YN")1

Or, the robust version:

=FIND(A1,UPPER("~YN"))1

--
Biff
Microsoft Excel MVP


"Lakeville" wrote in message
...
I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y
&
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Two types of Data Validation in a cell?

I thought it was case sensitive, but it is not working that way for me.

"Basil" wrote:
You could just select the 'List' option and type Y,N in the criteria. It is
case sensitive.

"Lakeville" wrote:

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Two types of Data Validation in a cell?

This is what I already have. If the user uses the drop down to select Y or N,
then it works properly. However, a user can manually enter lowercase y or n,
and I want to avoid that.

"ryguy7272" wrote:

Data Valivation List Source = =$B$1:$B$2
In Cell B1, put Y and in Cell B2, put N


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Lakeville" wrote:

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 60
Default Two types of Data Validation in a cell?

Strange. It would only stop them from entering the text once they navigate
away from the cell, and only if 'Show error alert after invalid data is
entered' is checked in the Error Alert tab of the Data Validation menu form.

Biff's solution should work too.

"Lakeville" wrote:

I thought it was case sensitive, but it is not working that way for me.

"Basil" wrote:
You could just select the 'List' option and type Y,N in the criteria. It is
case sensitive.

"Lakeville" wrote:

I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Two types of Data Validation in a cell?

Or, the robust version:

=FIND(A1,UPPER("~YN"))1


your formula fail. If user enter both YN in a cell


Try this one:

=AND(EXACT(A1,UPPER(A1)),OR(A1="Y",A1="N"))





"T. Valko" wrote:

Try this...

=FIND(A1,"~YN")1

Or, the robust version:

=FIND(A1,UPPER("~YN"))1

--
Biff
Microsoft Excel MVP


"Lakeville" wrote in message
...
I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y
&
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.



.

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Two types of Data Validation in a cell?

=FIND(A1,UPPER("~YN"))1
your formula fail. If user enter both YN in a cell


Good catch. I didn't test for that possibility.

Try this one:

=(LEN(A1)=1)*(FIND(A1,UPPER("YN")))

--
Biff
Microsoft Excel MVP


"Teethless mama" wrote in message
...
Or, the robust version:


=FIND(A1,UPPER("~YN"))1


your formula fail. If user enter both YN in a cell


Try this one:

=AND(EXACT(A1,UPPER(A1)),OR(A1="Y",A1="N"))





"T. Valko" wrote:

Try this...

=FIND(A1,"~YN")1

Or, the robust version:

=FIND(A1,UPPER("~YN"))1

--
Biff
Microsoft Excel MVP


"Lakeville" wrote in message
...
I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list
with Y
&
N. And I understand how to enforce capitalization:
=EXACT(A1,UPPER(A1)).
However, I don't understand how to enforce both for the same cell.



.



  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Strange.

If you apply the list differently then it will not allow small case one. Use comma separated values in Validation List Source.

On Friday, January 08, 2010 12:55 PM Lakeville wrote:


I want to ensure that the data in a cell is either a capitalized Y or a
capitalized N. I understand how to do the data validation of a list with Y &
N. And I understand how to enforce capitalization: =EXACT(A1,UPPER(A1)).
However, I do not understand how to enforce both for the same cell.



On Friday, January 08, 2010 1:14 PM Basil wrote:


You could just select the 'List' option and type Y,N in the criteria. It is
case sensitive.



"Lakeville" wrote:



On Friday, January 08, 2010 1:15 PM ryguy7272 wrote:


Data Valivation List Source = =$B$1:$B$2
In Cell B1, put Y and in Cell B2, put N


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Lakeville" wrote:



On Friday, January 08, 2010 1:15 PM T. Valko wrote:


Try this...

=FIND(A1,"~YN")1

Or, the robust version:

=FIND(A1,UPPER("~YN"))1

--
Biff
Microsoft Excel MVP



On Friday, January 08, 2010 1:24 PM Lakeville wrote:


I thought it was case sensitive, but it is not working that way for me.

"Basil" wrote:
You could just select the 'List' option and type Y,N in the criteria. It is
case sensitive.



On Friday, January 08, 2010 1:30 PM Lakeville wrote:


This is what I already have. If the user uses the drop down to select Y or N,
then it works properly. However, a user can manually enter lowercase y or n,
and I want to avoid that.

"ryguy7272" wrote:



On Friday, January 08, 2010 2:14 PM Basil wrote:


Strange. It would only stop them from entering the text once they navigate
away from the cell, and only if 'Show error alert after invalid data is
entered' is checked in the Error Alert tab of the Data Validation menu form.

Biff's solution should work too.

"Lakeville" wrote:



On Friday, January 08, 2010 11:46 PM Teethless mama wrote:


your formula fail. If user enter both YN in a cell


Try this one:

=AND(EXACT(A1,UPPER(A1)),OR(A1="Y",A1="N"))





"T. Valko" wrote:



On Saturday, January 09, 2010 12:27 AM T. Valko wrote:


Good catch. I did not test for that possibility.

Try this one:

=(LEN(A1)=1)*(FIND(A1,UPPER("YN")))

--
Biff
Microsoft Excel MVP




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
Validation Data using Validation Table cell range..... Dermot Excel Discussion (Misc queries) 16 January 5th 10 09:35 PM
How can I hide unused file types from file types list in save dial Estra Q Excel Discussion (Misc queries) 1 December 17th 09 12:36 PM
Excel 2007 error "some chart types cannot be combined with other chart types. Select a different chart types" roadsidetree Charts and Charting in Excel 15 June 2nd 09 10:53 AM
Data types when importing Excel data to SQLServer [email protected] Excel Discussion (Misc queries) 1 September 27th 06 12:48 PM
Mixed data types in a cell camell Excel Discussion (Misc queries) 2 March 8th 06 08:36 PM


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