+ Reply to Thread
Results 1 to 5 of 5

Trimming Data

  1. #1
    Terry Bennett
    Guest

    Trimming Data

    I have a lenghty list of data all within one column (ie; rows 1 - 2000).
    All of the data consists of a branch name followed by some figures in
    brackets, ie:

    Southampton (12345-654)

    Is there a way that I can 'trim' the data to remove everything within the
    brackets, including the brackets themselves?



  2. #2
    vezerid
    Guest

    Re: Trimming Data

    Terry,

    The following formula will remove the bracket part of a name in A2. It
    allows for an optional space before the left parenthesis.

    =IF(ISNUMBER(FIND(" (",A2)),LEFT(A2,FIND("
    (",A2)-1),LEFT(A2,FIND("(",A2)-1))

    If it is guaranteed that there will always be a space before the
    parenthesis then you can use the simpler formula:

    =LEFT(A2,FIND(" (",A2)-1)

    HTH
    Kostis Vezerides


  3. #3
    JE McGimpsey
    Guest

    Re: Trimming Data

    One way:

    Select your data, choose Data/Text to Columns. Select Delimited and
    click Next.

    If your branch names are all one word, check the space checkbox. If not,
    enter "(" (no quotes) in the Other input box. Click Finish. Delete the
    unneeded columns.

    If you chose "(", your branch names will have a trailing space. To
    remove them (if you care to) you can enter

    B1: =TRIM(A1)

    copy down as far as necessary, then copy column B, select column A and
    choose Edit/Paste Special/Values.






    In article <[email protected]>,
    "Terry Bennett" <[email protected]> wrote:

    > I have a lenghty list of data all within one column (ie; rows 1 - 2000).
    > All of the data consists of a branch name followed by some figures in
    > brackets, ie:
    >
    > Southampton (12345-654)
    >
    > Is there a way that I can 'trim' the data to remove everything within the
    > brackets, including the brackets themselves?


  4. #4
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    select the range your data resides in then
    press Ctrl+H
    in Find What: press a space then write this (*)
    in Replace with: leave it blank
    press Replace All
    you are done.
    hope this will serve your purpose.

    Quote Originally Posted by Terry Bennett
    I have a lenghty list of data all within one column (ie; rows 1 - 2000).
    All of the data consists of a branch name followed by some figures in
    brackets, ie:

    Southampton (12345-654)

    Is there a way that I can 'trim' the data to remove everything within the
    brackets, including the brackets themselves?

  5. #5
    Terry Bennett
    Guest

    Re: Trimming Data

    Many thanks guys - all of these work great!

    "starguy" <[email protected]> wrote in
    message news:[email protected]...
    >
    > select the range your data resides in then
    > press Ctrl+H
    > in Find What: press a space then write this (*)
    > in Replace with: leave it blank
    > press Replace All
    > you are done.
    > hope this will serve your purpose.
    >
    > Terry Bennett Wrote:
    >> I have a lenghty list of data all within one column (ie; rows 1 -
    >> 2000).
    >> All of the data consists of a branch name followed by some figures in
    >> brackets, ie:
    >>
    >> Southampton (12345-654)
    >>
    >> Is there a way that I can 'trim' the data to remove everything within
    >> the
    >> brackets, including the brackets themselves?

    >
    >
    > --
    > starguy
    > ------------------------------------------------------------------------
    > starguy's Profile:
    > http://www.excelforum.com/member.php...o&userid=32434
    > View this thread: http://www.excelforum.com/showthread...hreadid=562032
    >




+ 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