Closed Thread
Results 1 to 4 of 4

I want to type the letter Y in a cell and have the word Yes appea.

  1. #1
    jhardw
    Guest

    I want to type the letter Y in a cell and have the word Yes appea.

    I want to type the letter Y or N and the word yes or no to appear in the cell.

  2. #2
    Otto Moehrbach
    Guest

    Re: I want to type the letter Y in a cell and have the word Yes appea.

    One way is to setup the AutoCorrect feature of Excel. Setup AutoCorrect to
    substitute Yes for y and for Y. Same for No. AutoCorrect is accessed with
    Tools - AutoCorrect Options.
    Another way is to use an event macro to do it. Post back if you want an
    event macro. HTH Otto
    "jhardw" <[email protected]> wrote in message
    news:[email protected]...
    >I want to type the letter Y or N and the word yes or no to appear in the
    >cell.




  3. #3
    jhardw
    Guest

    Re: I want to type the letter Y in a cell and have the word Yes ap

    Thanks for the help, however, I tried the auto correct feature, but found
    whenever I typed the letter y the word yes would appear. If the event macro
    would prevent this from happening that would be great!
    - jhardw

    "Otto Moehrbach" wrote:

    > One way is to setup the AutoCorrect feature of Excel. Setup AutoCorrect to
    > substitute Yes for y and for Y. Same for No. AutoCorrect is accessed with
    > Tools - AutoCorrect Options.
    > Another way is to use an event macro to do it. Post back if you want an
    > event macro. HTH Otto
    > "jhardw" <[email protected]> wrote in message
    > news:[email protected]...
    > >I want to type the letter Y or N and the word yes or no to appear in the
    > >cell.

    >
    >
    >


  4. #4
    Gord Dibben
    Guest

    Re: I want to type the letter Y in a cell and have the word Yes ap

    Just a note: if you have "yes" in A1 and "no" in A2, type "y" in A3 and
    autocomplete will select "yes".

    No need for event code unless you would have several words starting with "y"
    in that column.

    But if you think you need it, try this event code.

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    On Error GoTo ws_exit:
    Application.EnableEvents = False
    If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
    Select Case LCase(Target.Value)
    Case "y"
    Target.Value = "yes"
    Case "n"
    Target.Value = "no"
    End Select
    End If
    ws_exit:
    Application.EnableEvents = True
    End Sub

    Right-click on the sheet tab and "View Code".

    Copy/paste the above into that module.

    As written, operates on A1:A10, adjust to suit.

    Note: works with lower or upper case entry.


    Gord Dibben Excel MVP

    On Fri, 1 Apr 2005 15:03:02 -0800, jhardw <[email protected]>
    wrote:

    >Thanks for the help, however, I tried the auto correct feature, but found
    >whenever I typed the letter y the word yes would appear. If the event macro
    >would prevent this from happening that would be great!
    >- jhardw
    >
    >"Otto Moehrbach" wrote:
    >
    >> One way is to setup the AutoCorrect feature of Excel. Setup AutoCorrect to
    >> substitute Yes for y and for Y. Same for No. AutoCorrect is accessed with
    >> Tools - AutoCorrect Options.
    >> Another way is to use an event macro to do it. Post back if you want an
    >> event macro. HTH Otto
    >> "jhardw" <[email protected]> wrote in message
    >> news:[email protected]...
    >> >I want to type the letter Y or N and the word yes or no to appear in the
    >> >cell.

    >>
    >>
    >>



Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1