Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Format cell to display "Y" or "N"when entering a 1 or zero

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Format cell to display "Y" or "N"when entering a 1 or zero

You can't. But right click sheet tabview codeinsert this.
Now if you are in the specified range you will get what you want

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("a2:a22")) Is Nothing Then
If Target = 1 Then Target = "Y"
If Target = 0 Then Target = "N"
End If
End Sub

--
Don Guillett
SalesAid Software

"Brad" wrote in message
...
How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Format cell to display "Y" or "N"when entering a 1 or zero

CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Format cell to display "Y" or "N"when entering a 1 or zero

Let me clarify further. How do I prevent someone from entering anything
other than a 1 or 0?

In other words, I want a 1 entered so the cell displays a "Y" or I want a 0
entered so the cell displays a "N". All other options should be invalid.

"Toppers" wrote:

CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Format cell to display "Y" or "N"when entering a 1 or zero

I just learned a new one but it does Y for anything above 1 also.

--
Don Guillett
SalesAid Software

"Toppers" wrote in message
...
CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Format cell to display "Y" or "N"when entering a 1 or zero

You could use Data Validation with list of 0,1 plus formatting as per
previous reply.

"Brad" wrote:

Let me clarify further. How do I prevent someone from entering anything
other than a 1 or 0?

In other words, I want a 1 entered so the cell displays a "Y" or I want a 0
entered so the cell displays a "N". All other options should be invalid.

"Toppers" wrote:

CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default Format cell to display "Y" or "N"when entering a 1 or zero

That works. Thanks!

"Toppers" wrote:

You could use Data Validation with list of 0,1 plus formatting as per
previous reply.

"Brad" wrote:

Let me clarify further. How do I prevent someone from entering anything
other than a 1 or 0?

In other words, I want a 1 entered so the cell displays a "Y" or I want a 0
entered so the cell displays a "N". All other options should be invalid.

"Toppers" wrote:

CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Format cell to display "Y" or "N"when entering a 1 or zero

DataValidationAllowWhole Number

Minimum.....0

Maximum.....1

The do the formatting as Toppers suggests.


Gord Dibben MS Excel MVP

On Thu, 8 Feb 2007 09:09:01 -0800, Brad wrote:

Let me clarify further. How do I prevent someone from entering anything
other than a 1 or 0?

In other words, I want a 1 entered so the cell displays a "Y" or I want a 0
entered so the cell displays a "N". All other options should be invalid.

"Toppers" wrote:

CUSTOM format cell as "Y";;"N"

HTH

"Brad" wrote:

How can I format a cell to display a "Y" or "N" when a value of 1 or 0 is
entered?


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
format cells to display 20 long sentences in a single cell r Excel Discussion (Misc queries) 2 December 8th 06 03:46 PM
Can I format a cell to display latitude and longitude Blair Excel Discussion (Misc queries) 3 November 2nd 06 02:25 PM
how to format a cell to display October 21st, 2006 Naomi Excel Worksheet Functions 2 October 22nd 06 09:55 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
Format a cell to display decimal hours. Fred Holmes Excel Discussion (Misc queries) 2 March 18th 05 03:32 PM


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