Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is there anyway to format a cell such that it can have the inputs of 'Y' or 'N'? At the moment when I tie in a the output from a drop-down menu to a particular cell, it seems to be converting the 'Y' and 'N' to a '1' and '2'. It like to keep it at 'Y' and 'N'. I am assuming that because it would be taking binary inputs, you could actually act to convert the '1' and '2' to the corresponding 'Y' or 'N, by writing a simple macro. But I figure there should be a simpler way... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you looked at using Data-Validation?
For example in VBA to set a validation for range A1:A20 Sub ValRange() With Range("A1:A20").Validation .Delete .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _ xlBetween, Formula1:="Y,N" .IgnoreBlank = True .InCellDropdown = True .InputTitle = "" .ErrorTitle = "" .InputMessage = "" .ErrorMessage = "" .ShowInput = True .ShowError = True End With End Sub -- Cheers Nigel wrote in message oups.com... Hello, Is there anyway to format a cell such that it can have the inputs of 'Y' or 'N'? At the moment when I tie in a the output from a drop-down menu to a particular cell, it seems to be converting the 'Y' and 'N' to a '1' and '2'. It like to keep it at 'Y' and 'N'. I am assuming that because it would be taking binary inputs, you could actually act to convert the '1' and '2' to the corresponding 'Y' or 'N, by writing a simple macro. But I figure there should be a simpler way... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting up formatting for a range of cells | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Setting one cell = to another, INCLUDING FORMATTING. | Excel Discussion (Misc queries) | |||
setting a range variable equal to the value of a string variable | Excel Programming | |||
Setting named range in VBA- how to set as formula/reference instead of text string? | Excel Programming |