+ Reply to Thread
Results 1 to 10 of 10

delete text after characters appear in cell.

  1. #1
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    delete text after characters appear in cell.

    Hi

    I need help with a VBA function on a spreadsheet. I have a column R headed as description. I need to remove text that comes after *** in each cell. Will somebody be able to assist. I will not be able to change the *** as by default when i extract the character is that.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: delete text after characters appear in cell.

    Do you mean
    Please Login or Register  to view this content.
    ?

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: delete text after characters appear in cell.

    I did it slightly different looking at the row vs the column. Unsure which he wants. Both do the same, but I like jindon's code better

    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: delete text after characters appear in cell.

    Does this help?

    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: delete text after characters appear in cell.

    Without any codes :
    Select column R >> Press Ctrl + H >> Type "~***" without quotation marks in Find what field >> Click 'Replace All'
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  6. #6
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: delete text after characters appear in cell.

    Hi jindon. Thanks your code worked. I'm not sure what I am missing here nut the code works (removes text) after i run the macros. For example when I type in a new entry into the cell R3, i find that i need to run the macros again for the function to work.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: delete text after characters appear in cell.

    Do you mean
    Please Login or Register  to view this content.
    ?
    Above code should be placed in worksheet code module.

  8. #8
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: delete text after characters appear in cell.

    Hi Jindon,

    Able to take a look at my file which I've attached.I did paste the code on the worksheet module. I think I'm missing a step here. Need some guidance.
    Attached Files Attached Files

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,464

    Re: delete text after characters appear in cell.

    Change any cell in col.R
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: delete text after characters appear in cell.

    thanks it worked.

+ 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. Delete Characters Before Last Space In Text String [SOLVED]
    By alacey425 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-01-2016, 11:30 PM
  2. Macro to delete all text and characters BUT numbers (including decimals) from excel
    By coolruler in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-23-2015, 01:20 AM
  3. [SOLVED] Formula to delete words from text only if text in over certain amount of characters
    By erikpaulsen in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-03-2015, 05:21 PM
  4. [SOLVED] Formula to Delete Text Between 2 Characters
    By Tellm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2015, 08:12 AM
  5. [SOLVED] Backspace event text box string formatting not able to delete characters
    By Code Flunkie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2014, 04:30 PM
  6. Replies: 2
    Last Post: 08-18-2011, 12:32 AM
  7. Delete last 9 characters from a cell
    By Tom K in forum Excel General
    Replies: 1
    Last Post: 03-05-2008, 02: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