Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    cell order change (excel 2003)

    Hello,
    I have multiple cells that have a number at the end and need to create a formula that could turn it around so the number is in the front. For example,
    cell a1 will have "licensure ASC 22255" and I need it to say "22255 licensure ASC". I was trying to do a text to column, but that did not work because there could be multiple words before the number comes up, however, the number will always be at the end of the cell. Any help would be great.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: cell order change (excel 2003)

    The User Defined Function below will return what you want:

    <code>
    Public Function RevName(strName As String) As String
    RevName = Right(strName, Len(strName) - InStrRev(strName, " ")) & " " & Left(strName, InStrRev(strName, " ") - 1)
    End Function
    </code>

    If A1 contains the string, then call the function like this:

    <code>
    =REVNAME(A1)
    </code>
    Legare Coleman

  3. #3
    2 Star Lounger
    Join Date
    Oct 2005
    Location
    Cambridgeshire, USA
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: cell order change (excel 2003)

    Thanks Legare that did the trick.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •