+ Reply to Thread
Results 1 to 3 of 3

is there an ISIN function to test for the presence of a character or text string in a cell

  1. #1
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Rhode Island
    MS-Off Ver
    Excel for Mac 2011 and 2007 on PC
    Posts
    265

    is there an ISIN function to test for the presence of a character or text string in a cell

    the title says it all. looking for the "-" to let me know to take the right 5 or right 10 characters out of an address string for the zip code.

    I think i could do it this way:

    =IF(LEFT(RIGHT(K2,5),1)="-",RIGHT(K2,10),RIGHT(K2,5)

    but thought there might be a simple function to interrogate a cell for a certain character, e.g. =ISIN(K2,"-")

    thanks

    brian

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: is there an ISIN function to test for the presence of a character or text string in a

    No, there's not a function like that.

    A couple of ways that will do the same thing...

    =IF(COUNT(FIND("-",A1)),...

    =IF(COUNTIF(A1,"*-*"),...
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Contributor
    Join Date
    08-07-2015
    Location
    AB, Canada
    MS-Off Ver
    Excel 2013 x64
    Posts
    132

    Re: is there an ISIN function to test for the presence of a character or text string in a

    The following tests for "-" within K2, and will return "false" if it finds "-" anywhere within K2, not just in the Nth position.

    =IF(ISERROR(FIND("-",K2),RIGHT(K2,5),RIGHT(K2,10))

    Assuming the "-" always appears 5 digits from the right, your formula seems to do the trick.

+ 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. Change character depending on presence of other character
    By RaydenUK in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2015, 04:17 PM
  2. [SOLVED] constructing IF logical test based on text string stored in other cell
    By 7344Robin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-29-2014, 11:27 AM
  3. [SOLVED] Search for string and test the character that is found after the string
    By flipjarg in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-10-2013, 04:27 PM
  4. [SOLVED] Highlight row based on character/text string containing in cell.
    By dihris in forum Excel General
    Replies: 2
    Last Post: 12-03-2012, 11:16 AM
  5. Replies: 4
    Last Post: 01-17-2011, 11:44 PM
  6. Vary character formats within text function string
    By Exceler in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-04-2007, 08:38 PM
  7. COUNTIF according to presence of string within text
    By Ingeniero1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-01-2006, 02:43 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