Consulting

Results 1 to 6 of 6

Thread: Solved: Convert String?

  1. #1

    Solved: Convert String?

    Hi,

    Is there any way to convert a capitalized full name to the following either by formula or code e.g

    MR P BLOGGS to Mr Bloggs
    MRS R FALKINGHAM to Mrs Falkingham

    I tried using left/right/lower but the numbers to convert change each time

    thanks for any help
    Jon

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try

    =PROPER(LEFT(A2,FIND(" ",A2)))&" "&PROPER(RIGHT(A2,LEN(A2)-FIND("~",SUBSTITUTE(A2&" "," ","~",LEN(A2)-LEN(SUBSTITUTE(A2," ",""))))))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Hi thanks for swift reply.

    Sorry wasn't specific enough - want to type

    MR P BLOGGS (or whatever) in to A1 on sheet1 and with the aid of the formula change it to Mr Bloggs in A1 on sheet2

    regards
    Jon

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Then just change all my A2 to Sheet1!A1 - basic stuff.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Yep sorry Bob - wasn't concentrating

    thanks again

  6. #6
    Great - works like a charm

    regards

    Jon

Posting Permissions

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