+ Reply to Thread
Results 1 to 6 of 6

Find if a formula in a row end's with specific word in string

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    38

    Find if a formula in a row end's with specific word in string

    How can I find if a formula in a row end's with a string?

    This is the HTML content:
    Please Login or Register  to view this content.
    This is my Formula to remove the HTML:
    Please Login or Register  to view this content.
    OUTPUT:

    thisisit.NEWLINE

    This is current formula to try check if the content ends with the word "NEWLINE" in the string:

    Please Login or Register  to view this content.
    OUTPUT:
    Not OK

    Note: My example file is in Portuguese. BUT the formula in "C2" cell in English, should be:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by gach; 06-20-2022 at 09:08 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Find if a formula in a row end's with specific word in string

    If you want to check whether B2 ends in "NEWLINE" you could use:

    =IF(RIGHT(TRIM(B2),7)="NEWLINE","OK","Not OK")

    Or if "NEWLINE" will be variable (and of variable length) that is stored in C1 for example then:

    =IF(RIGHT(TRIM(B2),LEN($C$1))=$C$1,"OK","Not OK")

    or simply:

    =IF(COUNTIF(B2,"*"&$C$1)=1,"OK","Not OK")

    I'm afraid I don't know the Portuguese equivalents, but hopefully the attached file will be of use.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Find if a formula in a row end's with specific word in string

    Thanks!

    This will do it! Seem's I was only wrong by using left instead of right.

    Quote Originally Posted by nick.williams View Post
    =IF(RIGHT(TRIM(B2),7)="NEWLINE","OK","Not OK")

  4. #4
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Find if a formula in a row end's with specific word in string

    Yes, you also had the length of the string as 1, which I changed to 7.

  5. #5
    Registered User
    Join Date
    03-26-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: Find if a formula in a row end's with specific word in string

    Quote Originally Posted by nick.williams View Post
    Yes, you also had the length of the string as 1, which I changed to 7.
    Yes. I forgot that also...

    Glad I can count with your precious help.

    Thanks once again.

  6. #6
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: Find if a formula in a row end's with specific word in string

    You're welcome, glad I could help

+ 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] VBA Find String before specific character in string
    By Catsonheat in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-25-2019, 07:31 AM
  2. [SOLVED] Can I use FIND function to find specific string in a single cell?
    By bonpara in forum Excel General
    Replies: 2
    Last Post: 10-05-2015, 05:46 PM
  3. [SOLVED] Find specific text in a string
    By craaaig69 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-14-2015, 03:28 PM
  4. Formula to Find a specific text within a text string
    By ewong in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-13-2012, 01:36 PM
  5. Find a specific string
    By AK69 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-26-2011, 12:06 PM
  6. Find Specific string
    By janjan_376 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-30-2009, 12:38 PM
  7. Find a specific string in a cell
    By loren.pottinger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-22-2006, 12:10 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