+ Reply to Thread
Results 1 to 3 of 3

Formula for removing unwanted characters

Hybrid View

  1. #1
    Registered User
    Join Date
    04-27-2017
    Location
    London
    MS-Off Ver
    MS Office 2013
    Posts
    38

    Formula for removing unwanted characters

    Hello All,

    Hoping for some help.

    I have a column listing order numbers followed by a * and number, the number indicating the piece within the order - for instance 66576505*2. I need to remove the *2 to just show the order number. In some cases, there are double digit pieces within the order so not as simple as just removing the last 2 characters. If it could remove everything from the * over to the right that would be excellent.

    Thanks for your help!

  2. #2
    Registered User
    Join Date
    07-02-2013
    Location
    Cheshire
    MS-Off Ver
    Office Professional 2007
    Posts
    79

    Re: Formula for removing unwanted characters

    Hi there. I am assuming you are able to put a formula in another column to show what you want to see. If so, this formula will give the result you want - it assumes your data is in C5: =LEFT(C5,FIND("*",C5&"*")-1). If you want to replace the contents, then you will have to use vba.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,028

    Re: Formula for removing unwanted characters

    An alternative means is to use Power Query
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Split Column by Delimiter" = Table.SplitColumn(Source, "Column1", Splitter.SplitTextByDelimiter("*", QuoteStyle.Csv), {"Column1.1", "Column1.2"}),
        #"Removed Columns" = Table.RemoveColumns(#"Split Column by Delimiter",{"Column1.2"})
    in
        #"Removed Columns"
    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.

    - Follow this link for a video which demonstrates how to use Power Query code provided.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. [SOLVED] Removing unwanted characters after a number
    By RaydenUK in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-24-2015, 11:42 AM
  2. Removing a set of unwanted characters from a column
    By Rob8489 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-23-2013, 08:28 PM
  3. Removing Unwanted Characters & Moving Others
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-10-2009, 10:09 AM
  4. removing unwanted characters
    By djbetterly in forum Excel General
    Replies: 4
    Last Post: 05-06-2008, 12:22 PM
  5. [SOLVED] Removing unwanted characters
    By Richard in forum Excel General
    Replies: 2
    Last Post: 06-23-2006, 02:40 PM
  6. Removing unwanted characters
    By jermsalerms in forum Excel General
    Replies: 15
    Last Post: 01-19-2006, 05:20 PM
  7. Removing unwanted characters
    By Scorpvin in forum Excel General
    Replies: 8
    Last Post: 12-05-2005, 05:10 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