+ Reply to Thread
Results 1 to 4 of 4

Reverse names and deleting common occurence.

  1. #1
    Registered User
    Join Date
    04-07-2008
    Location
    Adelaide, SA
    Posts
    87

    Reverse names and deleting common occurence.

    Hi all,

    I have a task of copying lots of names to a worksheet, and the problem is they are coming accross in reverse order. eg. Smith John instead of John Smith. I have found a formula which does this, however some names have (a) on the end of them eg. Smith John (a) and sometimes without a space eg Smith John(a).

    What I need is for the names to be reversed and have the (a) deleted if it occurs.

    Can anyone help?

    Thanks,

    Yappa

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,721
    Hello Yappa,

    with data in A1 try

    =TRIM(SUBSTITUTE(MID(A1,FIND(" ",A1)+1,255),"(a)",""))&" "&LEFT(A1,FIND(" ",A1)-1)

  3. #3
    Registered User
    Join Date
    04-07-2008
    Location
    Adelaide, SA
    Posts
    87
    daddylonglegs that's perfect! Thanks mate.

    Is there anyway I could get the (a) if it occurs to be printed in the next column over, or am I looking at vba for that?

    Yappa

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,721
    Try

    =IF(COUNTIF(A1,"*(a)"),"(a)","")

+ 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