+ Reply to Thread
Results 1 to 3 of 3

I am trying to truncate cells in a column from a specific character in a string

  1. #1
    Registered User
    Join Date
    10-25-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Question I am trying to truncate cells in a column from a specific character in a string

    I have a macro coded to create a new sheet, copy from the first sheet, and paste in specific format to the newly created sheet2. My problem is I cannot get column C to truncate at the end of each cell's string; being "..D" or "...D*". Every cell in column C ends in either "D" or "D*" and I need this removed. Any assistance would be helpful.

    Code I am currently working with is shown below. I would like to insert the needed code after

    CopyPaste_Sheet2.Hide
    ActiveWorkbook.Sheets(2).Activate


    Please Login or Register  to view this content.
    Thanks for looking at my frustrations.

    J.
    Last edited by goldbeje; 08-27-2012 at 11:32 AM. Reason: attachment

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: I am trying to truncate cells in a column from a specific character in a string

    Hello goldbeje,

    This version of your macro will remove the "D" and "D *" at the end of the cells on Sheet2.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    10-25-2011
    Location
    Des Moines, Iowa
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: I am trying to truncate cells in a column from a specific character in a string

    Thank you Ross!! That defnitely works. I was racking my brain last night and came up with this...

    Please Login or Register  to view this content.
    Much appreciated!!

    J.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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