+ Reply to Thread
Results 1 to 4 of 4

names and numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    11-02-2006
    Posts
    2

    names and numbers

    I exported my cell phonebook to csv and converted to xls.

    The phone leaves the last name in lower case, so I ran "Proper". Now, "Bob and Carol" has "And" interposed, and I would like Home, Wk, Work, Hm, Cell, etc. in lower case. Search "And" and replace with "and" is not working. The find part alone will find "And" by the value. But the replace part seems to only allow the function by the formula. Can it be done?

    A different approach also failed: Seems you can not highlight the last name and operate with "Shift f3" to change the case (right?).

    I think there might be problems to import my doctored file back into the phone, but I would still like to know solutions for the above Excel issues.

    A problem only indirectly related to Excel:
    The phone software has a separate module where you push one button to synch the phonebook with Outlook. I could not believe that they could not synch with a spreadsheet, but maybe text handling in Excel is too tricky. (?)

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Say your names strated in A1 then enter this in the next blank cell in row 1

    =PROPER(SUBSTITUTE(A1," and",""))

    It converts Bob and carol to Bob Carol.

    VBA Noob

  3. #3
    Registered User
    Join Date
    11-02-2006
    Posts
    2

    proper(substitute (.....))

    =PROPER(SUBSTITUTE(A1," and",""))


    Ok, that is one approach, but note that it may be Bob Smith and Carol Jones, so Bob and Carol is more representative and more likely to be typed into the phone (one point of origin).

    =PROPER(SUBSTITUTE(A1," And"," and")) ??

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    The below array formula (enter with Ctrl + Shift + Enter) would extract Bob Carol for this example.

    It does this by returning the first word and the 2nd last word in a string so doesn't work for your orginally post

    =LEFT(A1,FIND(" ",A1,1))&" "&MID(A1,SMALL(IF(MID(" "&A1,ROW(INDIRECT("1:"&LEN(A1)+1)),1)=" ",ROW(INDIRECT("1:"&LEN(A1)+1))),LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))),SUM(SMALL(IF(MID(" "&A1&" ",ROW(INDIRECT("1:"&LEN(A1)+2)),1)=" ",ROW(INDIRECT("1:"&LEN(A1)+2))),LEN(TRIM(A1))-LEN(SUBSTITUTE(TRIM(A1)," ",""))+{0,1})*{-1,1})-1)

    VBA Noob

+ 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