+ Reply to Thread
Results 1 to 3 of 3

VBA : adding and removing text within cells

  1. #1
    Annie
    Guest

    VBA : adding and removing text within cells

    Hi, I have a field named "Postal" at the top of column F that always include
    a number with 5 digits then a city name then a region name, such as "11090
    CARCASSONNE Linguadoca-Rossiglione". I need to create a program to have this
    field changed as following : "F-11090", then copying "CARCASSONNE" into the
    City field which is empty (column G). The city name is always starting just
    one space character after the postcode, same thing for the region name, it
    always starts one space character after the city name. The region has to be
    removed completely.
    Also, I have a field named Phone (column E), it is always starting with
    "+33", and I need to remove the "+33" automatically while keeping the
    following numbers in the fields.

    Maybe someone could help me ?
    Thanks very much
    Annie



  2. #2
    Dave O
    Guest

    Re: VBA : adding and removing text within cells

    Do you *need* to use VBA? You can get the same results without it.
    For column F, if the entries are always in the format similar to "11090
    City name city name etc", you can insert a "helper" column and write a
    formula that references column F, like this:
    ="F-"&MID(F1,1,5)

    For column E, can you do a search and replace? Search for "+33" and
    leave the "replace with" box blank.


  3. #3
    Ken Hudson
    Guest

    RE: VBA : adding and removing text within cells


    --
    Ken Hudson


    "Annie" wrote:

    > Hi, I have a field named "Postal" at the top of column F that always include
    > a number with 5 digits then a city name then a region name, such as "11090
    > CARCASSONNE Linguadoca-Rossiglione". I need to create a program to have this
    > field changed as following : "F-11090", then copying "CARCASSONNE" into the
    > City field which is empty (column G). The city name is always starting just
    > one space character after the postcode, same thing for the region name, it
    > always starts one space character after the city name. The region has to be
    > removed completely.
    > Also, I have a field named Phone (column E), it is always starting with
    > "+33", and I need to remove the "+33" automatically while keeping the
    > following numbers in the fields.
    >
    > Maybe someone could help me ?
    > Thanks very much
    > Annie
    >
    >
    >


+ 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