+ Reply to Thread
Results 1 to 5 of 5

Return TRUE if cell contains certain “x” or numbers

  1. #1
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    480

    Return TRUE if cell contains certain “x” or numbers

    Hi all,

    I need a formula that returns TRUE if one of the following criteria is met in cell EG13:

    cell contains e.g. "x", " x", "xx", "xxx", "5", "10" etc.

    and returns FALSE

    if the cell contains e.g. "Lux", "-2", "-8", “0”, "Fox” etc.

    To put it into words, if the cell contains a positive number (excluding zero) or an “x” (maximum 5) while ignoring spaces but excluding words such as “Fox” it returns TRUE otherwise it returns FALSE. Below is the formula I currently have but it doesn’t seem to work...

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    2016
    Posts
    220

    Re: Return TRUE if cell contains certain “x” or numbers

    Can you attach a sample spreadsheet with an example of your expected results?

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2010
    Posts
    4,898

    Re: Return TRUE if cell contains certain “x” or numbers

    Try this:

    =OR(REPT("x",{1,2,3,4,5})=SUBSTITUTE(EG13," ",""),N(EG13)>0)

  4. #4
    Forum Contributor
    Join Date
    07-13-2017
    Location
    Hong Kong
    MS-Off Ver
    MS Office 365
    Posts
    480

    Re: Return TRUE if cell contains certain “x” or numbers

    That does the job! Thanks!!

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider (Windows 10)
    Posts
    49,476

    Re: Return TRUE if cell contains certain “x” or numbers

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!

    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.
    Don't forget to say "thank you" to those who have helped you in your thread. If you wish, you can also reward them by clicking on their reputation star bottom left.

+ 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] Return TRUE if cell value is found in a list
    By Smally in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2016, 10:21 AM
  2. Replies: 3
    Last Post: 02-11-2012, 03:07 PM
  3. Return True/False if cell contains formula
    By rziegler in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2009, 03:03 PM
  4. [SOLVED] Return True if cell contains special character
    By linglc in forum Excel General
    Replies: 3
    Last Post: 07-26-2006, 03:05 AM
  5. Replies: 3
    Last Post: 07-15-2006, 05:20 AM
  6. Function to return True/False if all are validated as True by ISNU
    By Tetsuya Oguma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2006, 06:30 AM

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.6.0 RC 1