+ Reply to Thread
Results 1 to 4 of 4

Using a text string in an IF statement

  1. #1
    Forum Contributor
    Join Date
    08-25-2015
    Location
    Near Pittsburgh, PA
    MS-Off Ver
    Excel 2013
    Posts
    152

    Using a text string in an IF statement

    I currently track the books I have read in a spreadsheet. I would now like to change how the existing entries look, so that if the title starts with the word "THE", the name of the book would would show as "Booklist, The".
    My book title are in column B and I have worked out most of the formula, but can't get the first part of the IF statement to work. Here is what I want to do, in words for the book title in B2:
    IF =LEFT(B2,4) equals "THE ",
    THEN CONCATENATE(RIGHT(B2,LEN(B2)-4)," ,The "
    ELSE B2
    Help with the first part would be greatly appreciated!

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Using a text string in an IF statement

    IF =LEFT(B2,4) equals "THE ",
    THEN CONCATENATE(RIGHT(B2,LEN(B2)-4)," ,The "
    =IF( LEFT(B2,4) = "THE ", RIGHT(B2,LEN(B2)-4) & " ,The " , B2)
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    08-25-2015
    Location
    Near Pittsburgh, PA
    MS-Off Ver
    Excel 2013
    Posts
    152

    Re: Using a text string in an IF statement

    Perfect, THANKS!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Using a text string in an IF statement

    you are welcome

+ 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. complex if statement referencing text string
    By sgetraer in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-17-2019, 07:27 AM
  2. [SOLVED] Sum values if text is found in string of cell from downloaded bank statement
    By riveras in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-06-2013, 12:47 PM
  3. Replies: 9
    Last Post: 01-21-2013, 01:54 AM
  4. IF statement with text string
    By Dpalma in forum Excel General
    Replies: 2
    Last Post: 10-28-2010, 04:26 AM
  5. if statement that return a string of text?
    By zerosleep in forum Excel General
    Replies: 11
    Last Post: 01-12-2009, 11:25 AM
  6. LOOKUP a text string created from IF statement
    By Steve-in-austin in forum Excel General
    Replies: 0
    Last Post: 05-11-2006, 04:15 PM
  7. Or in an IF/THEN statement - text string
    By jpkeller55 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2005, 10:41 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