Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 8 of 8

Thread: data validation

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Posts
    197
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    In a cell I have data validation that only a X can be entered. The wierd thing is that I can enter in an "*" or "X" and it accepts it. Although it should not accept the "*". One more wierd thing is that it will accept a "X*" or a "*X". Does anyone know why this is?

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    if you're just using list with a plain and simple x in the source box, this should not be happening. You're not pasting (as opposed to typing) this in, are you?

    [ This Message was edited by: IML on 2002-05-02 13:49 ]

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Posts
    197
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am using a list and all I am doing is typing it in, not pasting.

  4. #4
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Denver, CO
    Posts
    1,743
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm stumped then. I was thinking if you were using a formula under custom as opposed to a list, you may run into some problems as the asterick is a wildcard character. At least you've ruled two things out... good luck

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Wivenhoe, England
    Posts
    912
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Can't replicate in Excel 2000. Which version are you using?

  6. #6
    Board Regular sen_edp's Avatar
    Join Date
    Mar 2002
    Location
    Hellas
    Posts
    555
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello Hawley

    I tried it in excel 2000 and , yes it happens.
    Maybe the * is a kind of wild character and excel ignores validation
    I will work on it more

    Andreas

  7. #7
    Board Regular
    Join Date
    Apr 2002
    Posts
    197
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm using Excel 97.

  8. #8
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The change event will refuse anything but an X in cell A1. Edit to the correct address...


    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$1" Then
    If Not Target = "X" Then
    MsgBox "Please enter an 'X'", , "Invalid Entry"
    Application.EnableEvents = False
    Target.Select
    Application.EnableEvents = True
    Exit Sub
    End If
    End If
    End Sub


    Tom

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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