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

Thread: Check for blank entries

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a form that's been set up in Excel, and need to check some of the fields have been filled in prior to printing or saving, and if they are empty then n error message is generated. The numeric fields are fine and work ok, but the text fields don't want to play. I'm using

    If Selection.FormulaR1C1 = "" then msgbox("...") etc

    I'm sure there's a proper way but can't see it. Please can anyone help?

    Thanks

  2. #2
    New Member
    Join Date
    Mar 2002
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    ...can I use IsNull?

    Like if IsNull(xxxx) then msgbox("...")

    IF so what should xxxx be? SOme of the cells are joined, by the way.

    Thanks again.

    Matt

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Perth Australia
    Posts
    1,584
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi there

    Would this code help - there needs to be about 10 spaces between the second set of quotes

    For Each cell In Selection
    If cell.Value = "" Or cell.Value < " (put 10 spaces between quotes) " Then
    MsgBox "blank fields " & cell.Address
    End If
    Next
    End Sub

    Regards
    Derek

    PS for relative reference in your message use: MsgBox "blank fields " & cell.Address(relative, relative)



    [ This Message was edited by: Derek on 2002-05-09 01:28 ]

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
  •