+ Reply to Thread
Results 1 to 5 of 5

How do I Selectively Remove Characters from Excel Cells?

  1. #1
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    How do I Selectively Remove Characters from Excel Cells?

    All my values within column A are separated by a dash. I'd like column B to continuously copy column A with the exception of the characters after the dash. example:

    ____A_____________B
    12345-456_______12345
    22456-333_______22456
    1553665-45______15553665

    How can I format cell B to constantly reproduce this result?

    Thanks
    Ocean
    Last edited by Ocean Zhang; 06-11-2009 at 04:10 PM.

  2. #2
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Re: How do I Selectively Remove Characters from Excel Cells?

    Sorry about the underscores. The board reformatted my post and removed all the spaces

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

    Re: How do I Selectively Remove Characters from Excel Cells?

    =LEFT(A1,FIND("-",A1)-1)
    or i suppose underscore
    =LEFT(A1,FIND("_",A1)-1)
    "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

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,578

    Re: How do I Selectively Remove Characters from Excel Cells?

    Please Login or Register  to view this content.
    The first gives you the value as text, the second as a number. Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Re: How do I Selectively Remove Characters from Excel Cells?

    Thanks!!!!!!!!!!

+ 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