+ Reply to Thread
Results 1 to 3 of 3

VBA - Delete hidden spaces in blank cells

  1. #1
    Registered User
    Join Date
    02-03-2016
    Location
    Brasil
    MS-Off Ver
    2013
    Posts
    10

    VBA - Delete hidden spaces in blank cells

    Hi guys,

    Would like to know if any of you know a code that could help me to clean the hidden spaces in blank cells.

    I already have one code, but when I execute it through a data column, it changes the day into month and month into day.

    Follow below my code:

    Dim LRi As Range, cell As Range

    Set LRi = Range("A2:N" & Range("A2").End(xlDown).Row)
    For Each cell In LRi
    cell.Value = Trim(Replace(cell.Value, ",", "."))
    Next cell


    Thanks

  2. #2
    Registered User
    Join Date
    02-03-2016
    Location
    Brasil
    MS-Off Ver
    2013
    Posts
    10

    Re: VBA - Delete hidden spaces in blank cells

    Actually, a code that trims all cells inside range E2:G500, would solve my issue, but I have no idea how to do this

  3. #3
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: VBA - Delete hidden spaces in blank cells

    The Replace part is what is messing up your days/months. You don't need it for what you have described.

    Please Login or Register  to view this content.
    Note: This isn't the most efficient way to do this but will work for your needs
    If you are happy with my response please click the * in the lower left of my post.

+ 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. Formula to delete any blank spaces in a UPC code
    By plank22 in forum Excel General
    Replies: 1
    Last Post: 11-26-2015, 01:20 PM
  2. Replies: 8
    Last Post: 11-26-2015, 12:46 PM
  3. [SOLVED] Delete rows with blank spaces in column A in multiple worksheets
    By alice2011 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-25-2015, 09:06 AM
  4. Delete blank spaces from a named range
    By Taemex in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2014, 04:02 PM
  5. Replies: 1
    Last Post: 10-17-2014, 02:16 AM
  6. delete all blank rows on a hidden sheet
    By FRIEL in forum Excel General
    Replies: 1
    Last Post: 09-10-2008, 12:32 PM
  7. [SOLVED] Delete hidden spaces in cells
    By Mark Christensen in forum Excel General
    Replies: 2
    Last Post: 06-30-2006, 10:10 AM

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