+ Reply to Thread
Results 1 to 3 of 3

Macro to remove characters preceding text descriptions

  1. #1
    Registered User
    Join Date
    01-17-2014
    Location
    London,England
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro to remove characters preceding text descriptions

    Hi, I am trying to create a macro to remove numbers and characters before a string of text on a very simple chart of accounts. Each row will have different amounts of characters, but all will have a hyphen, then a space, then the information I wish to keep.

    Example:

    1A - Fixed Assets
    10 - Intangible Assets
    Total 10 - Intangible Assets
    11 - Tangible Assets
    114 - Furniture, Fixtures & Fittings
    114000 - Furniture
    114500 - Accum Depreciation - Furniture
    Total 114 - Furniture, Fixtures & Fittings
    115 - Artwork

    And I want to write a code so it looks like this:

    Fixed Assets
    Intangible Assets
    Intangible Assets
    Tangible Assets
    Furniture, Fixtures & Fittings
    Furniture
    Accum Depreciation - Furniture
    Furniture, Fixtures & Fittings
    Artwork

    Can anyone please give me the VBA coding to eliminate all the numbers and hyphens? I intend to insert a column firstly to copy the new format into.

    Thanks!

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Macro to remove characters preceding text descriptions

    Select your data, then run:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Macro to remove characters preceding text descriptions

    if you are interested in formula solution

    suppose the data is from A2 down.formula in B2 is

    =RIGHT(A2,LEN(A2)-SEARCH("- ",A2)-1)

    copy B2 down.
    I am not an expert. better solutions may be available
    $$$$venkat1926$$$$@gmail.com

+ 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] Formula to insert text in new column if preceding more than one of the preceding have val
    By aimeecrystalaid in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-04-2013, 11:47 PM
  2. Use LEFT formula to extract text preceding ONE OF TWO possible characters
    By potejam in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-22-2013, 08:05 PM
  3. Replies: 8
    Last Post: 12-17-2012, 05:30 AM
  4. want to remove all text characters equal to one character in length from text string
    By tinalwalton@yahoo.co.uk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-18-2005, 05:06 PM
  5. [SOLVED] want to remove all text characters equal to one character in length from text string
    By tinalwalton@yahoo.co.uk in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2005, 08: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