+ Reply to Thread
Results 1 to 3 of 3

cell.isNumber error

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    cell.isNumber error

    Hello,

    I'm receiving the error 'Object does not support this property or method' on the line of code containing the "cell.isNumber" function:

    With ActiveWorkbook.Worksheets("DO Brdgs Pass. Miles")
            Set rngtest = .Range(.Range("A6"), .Range("A" & .Rows.Count).End(xlUp))
        End With
        
        With Worksheets("DO Brdgs Pass. Miles")
        Set totalrng = .Range("B6", Range("P" & Rows.Count).End(xlUp))
        End With
        For Each cell In totalrng
            If Not cell.IsNumber Then
                With cell.Interior
                    .Pattern = xlSolid
                    .PatternThemeColor = xlThemeColorAccent1
                    .Color = 12632256
                    .TintAndShade = 0
                    .PatternTintAndShade = 0.599993896298105
                End With
            End If
        Next
    Do I need to use something else when calling the isNumber query? Or is my syntax resulting in this error?

    Thanks,
    Chad

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: cell.isNumber error

    Hi, Chad,

    shouldn´t that line read
    If Not WorksheetFunction.IsNumber(cell) Then
    or
    If Not IsNumeric(cell) Then
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Contributor
    Join Date
    07-12-2013
    Location
    Los angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    109

    Re: cell.isNumber error

    Thanks, HaHobe. I always get confused on what IS a 'WorksheetFunction' and what ISN'T.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Error with ISNUMBER Match
    By sinspawn56 in forum Excel General
    Replies: 2
    Last Post: 01-07-2013, 03:15 PM
  2. Replies: 4
    Last Post: 04-01-2010, 10:11 AM
  3. Elseif Not IsNumber error
    By toocold in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2007, 02:45 AM
  4. [SOLVED] If one cell isnumber, and another has text,..
    By Steve in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2006, 12:50 PM
  5. [SOLVED] Value/IsNumber/Brackets..? cell equal to range w/o Average
    By nastech in forum Excel General
    Replies: 2
    Last Post: 03-28-2006, 07:50 PM

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