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

Thread: handling blanks in a numeric test

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

    Default

    I have a macro with:
    "If ((Rows(y).Cells(3)) > 10) Then"

    and it works fine unless I try it on a spreadsheet with blanks in cell(3). then I get a "runtype error 13 . type mismatch"

    How can I check for blanks and get rid of them before they cause this problem?

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

    Default

    On 2002-04-05 13:17, justin wrote:
    I have a macro with:
    "If ((Rows(y).Cells(3)) > 10) Then"

    and it works fine unless I try it on a spreadsheet with blanks in cell(3). then I get a "runtype error 13 . type mismatch"

    How can I check for blanks and get rid of them before they cause this problem?
    try:
    If (isnumeric((Rows(y).Cells(3))) > 10) Then

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

    Default

    Sorry, my mistake, should be:

    If (isnumeric(Rows(y).Cells(3)) then
    If ((Rows(y).Cells(3)) > 10) Then


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
  •