+ Reply to Thread
Results 1 to 15 of 15

Swap text in a cell complication

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Swap text in a cell complication

    I have a small problem and I hoped someone here could help me, because I'm not very good with Excel.

    I have this formula

    =TRIM(MID(A1,FIND(",",A1)+1,1000))&" "&LEFT(A1,FIND(",",A1)-1)

    And I need a formula that will do this for me:

    I have John, Smith; Alexander, Grimes and with the formula it will turn into Smith John; Grimes Alexander

    PS: I don't want to necessarily lose the comma, but in most of the formulas I found, It would turn John, Smith into John Smith,.

    Can anyone help?
    Last edited by alexxshadows; 11-14-2012 at 02:36 PM.

  2. #2
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    in b5 cell John, Smith
    =RIGHT(B5,LEN(B5)-FIND(",",B5,1))&", "&LEFT(B5,FIND(",",B5,1)-1)

    Output: Smith, John

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    This did what the other formula did even though I really appreciate the help... I just wanted to know if it's possible to do it with two names in a cell, and switch the names, but keep the ;

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    OOps I am sorry
    Now I am looking for that

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    =right(b9,len(b9)-find(";",b9,1))&"; "&left(b9,find(";",b9,1)-1)

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    I feel so bad for bothering you :/ This won't do it for me either, it gives me #VALUE!

  7. #7
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    =TRIM(MID(C9,FIND(",",C9,1)+2,FIND(";",C9,1)-FIND(",",C9,1)-2)&" "&LEFT(C9,FIND(",",C9,1)-1)&"; "&RIGHT(C9,LEN(C9)-FIND(",",C9,FIND(",",C9,1)+1)-1)&" "&MID(C9,FIND(";",C9,1)+1,FIND(",",C9,FIND(",",C9,1)+1)-FIND(";",C9,1)-1))

    Outcome: Smith John; Grimes Alexander

  8. #8
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    Thank you SO much for taking the time to fix this! It does solve 80% of my problem.

    It's only that I have a lot of files and many are also, like, Smith, John and I'd need it to do both this and what the formula above does, and I realize it's a lot, and for now it does everything it needs but if anyone ever has the time, I'd appreciate it

  9. #9
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    The formula above separates each word and then concatenates them according to your guidance.

  10. #10
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    Yes, that's right, I fixed it now, sorry. Thank you so much again!

  11. #11
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    what if i have john, smith;alexander, grimes? i think the space changed the formula because now it changes but minues one letter

  12. #12
    Registered User
    Join Date
    11-14-2012
    Location
    Romania
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Swap text in a cell complication

    Sorry, tried from another computer and it worked.

  13. #13
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    Quote Originally Posted by alexxshadows View Post
    Sorry, tried from another computer and it worked.
    Happy to know that it works.
    Sorry for wrong answers in the beginning
    Good luck

  14. #14
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Swap text in a cell complication

    Quote Originally Posted by alexxshadows View Post
    Sorry, tried from another computer and it worked.
    Happy to know that it works.
    Sorry for wrong answers in the beginning
    Good luck

  15. #15
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Swap text in a cell complication

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as "SOLVED".
    For the meantime I'll do it for you.

    How?
    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

    Note:
    You can also thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given.
    By doing so you can add to the reputation(s) of those who helped and shared their time in helping you.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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