+ Reply to Thread
Results 1 to 6 of 6

Cell contains number or just text

Hybrid View

lovinguy Cell contains number or just... 06-19-2014, 12:44 PM
Ron Coderre Re: Cell contains number or... 06-19-2014, 12:54 PM
FDibbins Re: Cell contains number or... 06-19-2014, 12:58 PM
martindwilson Re: Cell contains number or... 06-19-2014, 01:01 PM
lovinguy Re: Cell contains number or... 06-19-2014, 02:13 PM
FDibbins Re: Cell contains number or... 06-19-2014, 02:21 PM
  1. #1
    Forum Contributor
    Join Date
    10-21-2010
    Location
    LONDON
    MS-Off Ver
    2007
    Posts
    108

    Cell contains number or just text

    Hi,

    I have a column which contains data which is in number,text and combination of number+text. I want to apply a formula to find the cells which contains only text.

    Tried to use ISTEXT and ISNUMBER but not working.

    Attached sheet contains example.Desired output is highlighted with yellow color

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Cell contains number or just text

    Using your posted workbook, this regular formula returns TRUE for cells containing no digits, otherwise FALSE:
    B1: =MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))>LEN(A1)
    or...for a descriptive result:
    B1: =IF(MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789"))>LEN(A1),"TEXT","CONTAINS NUMBER")
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Cell contains number or just text

    those cells that contain numbers are still text, because they also contain text

    Try this, copied down...
    =IF(LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))=0,"TEXT","Contains Number")
    (base formula Curtesy of:*Ron Coderre)

    edit: LOL Ron
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Cell contains number or just text

    Another
    =IF(ISERROR(LOOKUP(10^99,--MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),"TEXT","CONTAINS NUMBER")
    or shorter
    =IF(ISERROR(LOOKUP(10^99,--MID(A1,ROW($1:$255),1))),"TEXT","CONTAINS NUMBER")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Forum Contributor
    Join Date
    10-21-2010
    Location
    LONDON
    MS-Off Ver
    2007
    Posts
    108

    Re: Cell contains number or just text

    Possible to get values pasted on 3rd column if the value is "TEXT"

    Thanks in advance

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Cell contains number or just text

    Not exactly sure what you mean there, but this will either give a 0 if there no numbers, or the number within the text string...

    =LOOKUP(99^99,--("0"&MID(A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&"0123456789")),ROW($1:$10000))))...Curtesy of:*Ron Coderre

+ 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] Cell with text and number, not rounding to closest full number
    By cblp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-03-2014, 07:51 PM
  2. [SOLVED] Formula to count the number of spaces before text/number is written in a cell.
    By kmis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-12-2013, 05:05 PM
  3. [SOLVED] extracting number from cell contains both text and number alternatively
    By green369 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 10:17 AM
  4. Replies: 4
    Last Post: 11-13-2012, 02:16 PM
  5. ZeroPadding Mixed Number, Text, Number Content in Cell
    By Sbubendorf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2008, 05:52 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