+ Reply to Thread
Results 1 to 3 of 3

Removing preceeding and trailing characters

  1. #1
    Registered User
    Join Date
    02-19-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Removing preceeding and trailing characters

    Hi all,

    I am trying to create a CSV file to import all of our workers into a payroll software. Unfortunately the list of workers that I have been given to work with has a first and a last name together in one cell. I need to split them into separate cells so the data ends up in the right field in our software. By importing external data and separating the names with the comma as a delimiter, I have ended up with the first name in one cell and the second in another, which is exactly what I need. However, this process also ends up putting a quotation mark in front of the first names in the cells in column A, and a quotation mark after the second name in the cells in column B. I remember someone helped me to removing trailing spaces with a macro once, and I am hoping the same theory can be applied to make two macros - one to remove preceding quotation marks, and one to remove trailing quotation marks. The only trouble is, I know no VBA whatsoever, and don't even know how to make a macro unfortunately. Would someone mind letting me know if what I need is possible, and then - literally step by basic step - explain how to make a macro and provide the code to paste into it?

    Or alternatively, does someone know how to separate the data into two columns without the quotation marks? (There aren't any quotation marks on the original data).

    many thanks in advance
    Last edited by Spiritseeker; 02-28-2009 at 08:46 AM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Removing preceeding and trailing characters

    why not use find replace? find " replace nothing?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-19-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Removing preceeding and trailing characters

    Why not indeed - thanks for the obvious and simple solution. I do tend to overcomplicate things sometimes!

+ 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