+ Reply to Thread
Results 1 to 3 of 3

Remove after Dash

  1. #1
    Registered User
    Join Date
    01-01-2014
    Location
    United States
    MS-Off Ver
    O365 (v2204)
    Posts
    82

    Remove after Dash

    Hello,

    Column b2 over 500 sku's and I need to remove everything after the dash. Normally a find replace -* would do this but in this list o sku's some have one dash and some have two. If the sku has one dash remove everything -* and if it has two dashes remove everything after the second dash. Any idea how to do this?

    Example

    LED15008
    15006-MP-34
    15006-MP-35
    85103-ORB
    85103-SP
    15005-3-34
    15005-3-35
    96905-MTP
    88531-SB
    88531-SP


    Should be when finished

    LED15008
    15006-MP
    15006-MP
    85103
    85103
    15005-3
    15005-3
    96905
    88531
    88531

    Thanks in advance

    I also have another more complicated problem. Is there an area to get paid support?

  2. #2
    Forum Expert PaulM100's Avatar
    Join Date
    10-09-2017
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    2,108

    Re: Remove after Dash

    This should do:
    =IFERROR(LEFT(A1,FIND("^^",SUBSTITUTE(A1,"-","^^",LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))))-1),A1)

    This forum has Comercial Services if you want better ans faster responses. See here:
    https://www.excelforum.com/payments.php

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Remove after Dash

    Another way.


    A
    B
    C
    1
    LED15008
    LED15008
    =IFERROR(LEFT(A1,LOOKUP(1E+306,FIND("-",A1,ROW($1:$25)))-1),A1)
    2
    15006-MP-34
    15006-MP
    3
    15006-MP-35
    15006-MP
    4
    85103-ORB
    85103
    5
    85103-SP
    85103
    6
    15005-3-34
    15005-3
    7
    15005-3-35
    15005-3
    8
    96905-MTP
    96905
    9
    88531-SB
    88531
    10
    88531-SP
    88531
    Dave

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Remove dash (-) that resides between numbers in a SSN
    By wheatgrass in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-02-2012, 08:21 AM
  2. Remove dash from Date
    By mma3824 in forum Excel General
    Replies: 1
    Last Post: 10-30-2012, 07:04 AM
  3. Remove Dash from entire column
    By MC Advantages in forum Excel General
    Replies: 1
    Last Post: 01-15-2009, 01:33 PM
  4. remove the dash
    By sigdig in forum Excel General
    Replies: 3
    Last Post: 10-24-2006, 12:13 AM
  5. [SOLVED] Remove dash(s)
    By Pierre in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-14-2006, 11:00 PM
  6. remove a dash from part numbers
    By Mr Happy in forum Excel General
    Replies: 3
    Last Post: 05-25-2006, 04:10 PM
  7. Remove dash in cell
    By dyukon in forum Excel General
    Replies: 3
    Last Post: 01-19-2006, 12:50 PM

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