+ Reply to Thread
Results 1 to 7 of 7

Trimming a Cell

  1. #1
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32

    Trimming a Cell

    Hi Guys,
    This is my first topic , so please be gentle
    I need to remove a blank first line from a cell, attached two cells photo.
    Something with replace "chr(13)" or "chr(10)".

    Thanks
    Attached Images Attached Images
    Last edited by Barmoley; 11-12-2008 at 10:35 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    possibly...

    =Substitute(A1,Char(10),"",1) to replace first occurance of Char(10)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32
    Hi NBVC ,
    I changed it to:
    MyCell = Replace(MyCell, Chr(10), "", 1, 1) and only first chr(10) was removed.

    Thanks a lot!
    Last edited by Barmoley; 11-12-2008 at 09:01 AM.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    To replace all occurances:


    =Substitute(A1,Char(10),"")

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Barmoley View Post
    Hi NBVC ,
    I changed it to:
    MyCell = Replace(MyCell, Chr(10), "", 1, 1) and only first chr(10) was removed.

    Thanks a lot!
    So is this solved? Not sure....

  6. #6
    Registered User
    Join Date
    11-12-2008
    Location
    Hawaii
    Posts
    32
    Yes , it solved. It deletes only first "chr(10)" and that's what I need.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Ok, great...

    Can you please mark your thread solved...

    Click your original post and click Go Advanced.

    Select [Solved] from the left dropdown menu and click Submit.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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