+ Reply to Thread
Results 1 to 3 of 3

Question: Can If statement look for a number value only and ignore text?

  1. #1
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Question: Can If statement look for a number value only and ignore text?

    I keep getting an error if I select a row that has text verses a number value. I want to get rid of the error with an if statement, but I am not sure if there is a way to look for just a number value??

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,463

    Re: Question: Can If statement look for a number value only and ignore text?

    You can use the ISNUMBER or ISTEXT worksheet functions.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    06-28-2013
    Location
    Green Bay, WI
    MS-Off Ver
    Excel 2007
    Posts
    125

    Re: Question: Can If statement look for a number value only and ignore text?

    It worked perfectly and took care of the error message. I was able to put up a message box to please select a valid row and exit the sub.

    Thanks. I have never heard of that function before.

+ 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. IFTHEN Statement - checking if a number is larger by a certain % - noob question
    By wallstreetballa in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-06-2013, 02:22 AM
  2. If then formula to ignore text after number
    By jakeh2475 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-14-2012, 12:29 PM
  3. IF statement help-it be a number or text
    By exile666 in forum Excel General
    Replies: 2
    Last Post: 03-21-2010, 07:03 PM
  4. If statement (Ignore blank)
    By lisadang in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2008, 12:19 AM
  5. Statement to ignore step if does not find text to Split
    By maperalia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2006, 05:25 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