+ Reply to Thread
Results 1 to 4 of 4

Need advice, formula problem - separate the last word in sentence ?

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Exclamation Need advice, formula problem - separate the last word in sentence ?

    Hello !

    I am beginner in excel formula. i please need some advice for this:

    =IF(FIND("-";A1;1);SUBSTITUTE(A1;"-";" ";1)*AND(IF(ISERR(FIND(" ";A1));"";RIGHT(A1;LEN(A1)-FIND("*";SUBSTITUTE(A1;" ";"*";LEN(A1)-LEN(SUBSTITUTE(A1;" ";"")))))));"no")

    If i have a sentence in cell i want the last word of this sentence, but it may happen that last and penultimate word are conect with "-"(dash).

    On the net i found this formulas:
    =IF(ISERR(FIND(" ";A9));"";RIGHT(A9;LEN(A9)-FIND("*";SUBSTITUTE(A9;" ";"*";LEN(A9)-LEN(SUBSTITUTE(A9;" ";""))))))
    and
    =TRIM(RIGHT(SUBSTITUTE(A7;" ";REPT(" ";LEN(A7)));LEN(A7)))
    for split or separated last word in sentence from other text

    then i found these:
    =SUBSTITUTE(A15; "-"; " "; 1)
    i need these because it cases when the last two words associated with "-"(dash) so I have to get rid of if I want the last word

    and:
    =IF(FIND("-";A15;1);"yes";"no")
    that found me "-"(dash). i don't know if i need these

    now i want all of these formula fusion together?

    any ideas ?

    Thank for help realy !
    Have nice day !
    Last edited by zeko90; 08-13-2012 at 07:27 AM. Reason: inadequate title

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: question of the formula

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.



    As you are new to the forum I'll change it on this occasion but please note for the future.

    Please also give some examples of your data and the results you expect to see. Be sure to show all possible permutations.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Need advice, formula problem - separate the last word in sentence ?

    Does this work?

    =TRIM(RIGHT(SUBSTITUTE(SUBSTITUTE(A1,"-"," ")," ",REPT(" ",99)),99))
    Audere est facere

  4. #4
    Registered User
    Join Date
    08-13-2012
    Location
    Slovenia
    MS-Off Ver
    Excel 2010
    Posts
    72

    Talking Re: Need advice, formula problem - separate the last word in sentence ?

    Thank you very very much, yes it's work great !

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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