+ Reply to Thread
Results 1 to 4 of 4

Thread: Check if a cell contains a number and text as opposed to just text

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    136

    Check if a cell contains a number and text as opposed to just text

    Hey all,

    I have two kinds of content in cells, either a business name or address:

    'CHARLES R TUTWILER AND ASSOCIATES INC
    '127 GRAND AVENUE

    The address will contain a number whereas a business name shouldn't. Hence, I am only trying to target the businesses not addresses. So the only way I see to do this is to check if the cell contains a number at the second index position. If so, then it must be address. Problem is the ISTEXT function returns true even when I try to determine whether the second character is text, even though it isn't, as illustrated in attachment.

    Thanks for response.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,202

    Re: Check if a cell contains a number and text as opposed to just text

    Maybe this:

    =ISNUMBER(LOOKUP(99^99,SEARCH({0,1,2,3,4,5,6,7,8,9},A1)))
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    136

    Re: Check if a cell contains a number and text as opposed to just text

    Thanks for response.

    I ultimately got it working with this:

    =REGEX.COMP(A2,"[1-9]")

  4. #4
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,056

    Re: Check if a cell contains a number and text as opposed to just text

    The ' doesn't count as a character so you actually need to test character 1 I think. You can test whether thats a number like this

    =ISNUMBER(LEFT(A1,1)+0)
    Audere est facere

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0