+ Reply to Thread
Results 1 to 3 of 3

Edit Cell Contents by Deleting the First Four Characters

  1. #1
    Registered User
    Join Date
    07-05-2015
    Location
    Richmond, Texas, USA
    MS-Off Ver
    2007
    Posts
    1

    Post Edit Cell Contents by Deleting the First Four Characters

    My worksheet has a column of around 500 cells with data in the following form:

    XXX-PXXXXXX-XXX-XXX

    I need to write a macro code to delete the first 4 characters, i.e., edit each cell to become:

    PXXXXXX-XXX-XXX

    Any help forum members can provide would be greatly appreciated.

    Thanks.

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Edit Cell Contents by Deleting the First Four Characters

    not sure if you need a macro to achieve this
    could you not just use MID formula and filldown?

    if cell A1 has the data
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Edit Cell Contents by Deleting the First Four Characters

    or...
    =right(A1,len(a1)-4)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. Deleting first characters from a cell
    By sheenyp in forum Excel General
    Replies: 2
    Last Post: 11-11-2010, 08:42 AM
  2. How to edit contents in Cell
    By hrukmini in forum Excel General
    Replies: 1
    Last Post: 05-11-2008, 10:36 PM
  3. Replies: 2
    Last Post: 03-31-2007, 06:59 AM
  4. Replies: 4
    Last Post: 03-28-2005, 05:06 PM
  5. Replies: 7
    Last Post: 03-27-2005, 08:06 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