Results 1 to 6 of 6

Thread: Remove Hard Carriage Return And Leading And Trailing Spaces

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,401
    Rep Power
    10
    That seems to be a completely different requirement, unrelated to what you are doing above. Best to start a new thread with the code/sample workbook
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  2. #2
    Junior Member
    Join Date
    Apr 2019
    Posts
    3
    Rep Power
    0
    I have resolved the issue of the conditional formatting by modifying the target.

    Regarding the solution for the trim and carriage returns' removal, which work very efficiently, I am still running into a problem. My worksheet contains several other macros; one of the macros is to append the worked data to a different worksheet, and I am getting at the column "A" of the worksheet where I am applying your solution multiple rows with "#VALUE!" which when doing the append, it gives me incorrect results due to the contents of column "A".

    I am wondering if possible to have your solution, instead of hard coded for a range, to have it dynamically to be triggered by an input to a cell of the column "A", and within the range "A4:A1004"

    Thank you!

  3. #3
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    Hello David Montoya,
    I am finding it hard to understand what you are asking with this:
    Quote Originally Posted by David Montoya View Post
    I am wondering if possible to have your solution, instead of hard coded for a range, to have it dynamically to be triggered by an input to a cell of the column "A", and within the range "A4:A1004"
    As I understand it, the effect of this code line, .._
    Code:
      If Not Intersect(Target, Range("A4:A1004")) Is Nothing Then
    _.. , is to trigger, if a cell or cells in the range "A4:A1004" have its or their value changed.

    ( Further, the effect of this, .._
    Code:
        With Intersect(Target, Range("A4:A1004"))
    , _.. is to restrict action to the cell or cells which were changed. )

    That sounds close to what you are asking for.
    So I am confused about what you are actually wanting.
    It does not take much to coinfuse me. So I may have overlooked something, or missed the point
    It might be easier if you could give us a workbook with a reduced size sample, of desensitized data, to help explain what you want and / or what the problem is that you are having.

    Alan

    P.s. Welcome to excelfox.com :-)
    Last edited by DocAElstein; 04-15-2019 at 11:54 AM.

Similar Threads

  1. Wrap Text On Spaces Up To A Maximum Number Of Characters Per Line
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 15
    Last Post: 12-20-2016, 09:47 AM
  2. hard question
    By mahmoud-lee in forum Excel Help
    Replies: 1
    Last Post: 05-28-2013, 02:27 PM
  3. LTRIM() Function VBA: To Remove Spaces
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 05-17-2013, 12:32 AM
  4. Macro to delete trailing X's
    By Howardc in forum Excel Help
    Replies: 2
    Last Post: 03-29-2013, 12:43 PM
  5. VBA editor auto-deletes spaces at the ends of lines
    By LalitPandey87 in forum Excel Help
    Replies: 0
    Last Post: 06-26-2012, 07:53 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •