+ Reply to Thread
Results 1 to 7 of 7

trying to locate the first space and display the text to the right of it.

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    trying to locate the first space and display the text to the right of it.

    I87 = Intermediate Water elemental
    I am displaying the first word in a cell here
    =IF(I87="","",LEFT(I87,FIND(" ",I87,1)))

    Trying to display second and third words in another cell.
    I have several different combinations In I87 that are generated randomly.
    I87 = Minor Fey
    I87 = Intermediate Water elemental
    I87 = Major Red dragon
    what I am going for is a cell that splits up power level and type into two different cells
    so I can index a chart for what is displayed.
    what is the formula for this please and thanks in advance.
    trying to stay away from macros
    Attached Files Attached Files
    Last edited by weedfiend; 11-08-2013 at 01:35 AM.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: trying to locate the first space and display the text to the right of it.

    hi weedfiend. try:
    =IFERROR(TRIM(MID(SUBSTITUTE($I87," ",REPT(" ",100)),1+(COLUMNS($J87:J87)-1)*100,100)),"")

    if you're interested to know how it works, concept is similar to sheet 12 of the file of my link in my signature; Tips & Tutorials
    Attached Files Attached Files
    Last edited by benishiryo; 11-08-2013 at 01:22 AM. Reason: attached file

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    04-16-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: trying to locate the first space and display the text to the right of it.

    this gives me the left of the first space. I wanted to the right of the first space

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: trying to locate the first space and display the text to the right of it.

    I87 = Minor Fey
    I87 = Intermediate Water elemental
    I87 = Major Red dragon
    using the formula =IF(I87="","",LEFT(I87,FIND(" ",I87,1))) I get the word "minor" or "intermediate" or "Major" depending on what is in the cell at that time. this is displayed in cell I88
    I want cell I89 to display "fey" or "water elemental" or "red dragon" again depending on what is in I87
    I have them generated randomly for this purpose if the person selects "major red dragon" I am going to index the chart that I have made to display what is given to the "major red dragon" this is for 3.5 D&D system character sheet I am creating.

  5. #5
    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
    52,935

    Re: trying to locate the first space and display the text to the right of it.

    This will break out all word when copied across, with the data in A1 - adjust as needed...
    =TRIM(MID(SUBSTITUTE($A1," ",REPT(" ",LEN($A1))),LEN($A1)*(COLUMN()-2)+1,LEN($A1)))
    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

  6. #6
    Registered User
    Join Date
    04-16-2013
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: trying to locate the first space and display the text to the right of it.

    sorry, I uploaded my sheet to the original post
    I 87 is pulling data from another tab(not shown) the whole file is too big to upload.
    I 88 is finding the level of the bloodline
    I 89 is what the bloodline is
    that is what I want displayed so I can index it according to level
    Attached Files Attached Files

  7. #7
    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
    52,935

    Re: trying to locate the first space and display the text to the right of it.

    Not sure you uploaded the right workbook? (or maybe wrong references?)

    I87=Gold Dragon
    I88=Intermediate Ogre
    I89=Intermediate

    IF it is "ogre" you want to extract, then try this...
    =TRIM(MID(SUBSTITUTE($I87," ",REPT(" ",LEN($I87))),LEN($I87)*(COLUMN()-8)+1,LEN($I87)))
    for subsequent words, copy it across

+ 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. Display text between space X and X from cell.
    By carl5156 in forum Excel General
    Replies: 9
    Last Post: 02-19-2014, 11:10 PM
  2. Simple code to locate a word and remove space in front
    By yiannis1925 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2011, 10:14 AM
  3. How to Locate a value and display the match item
    By wpm7113 in forum Excel General
    Replies: 7
    Last Post: 05-16-2008, 07:54 AM
  4. [SOLVED] Using FIND function to locate space between first and last name
    By Dennis_in_nh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2006, 03:20 PM
  5. VBA code using Find to locate text and display the Cell Range.
    By slimla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-27-2005, 05:05 PM

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