+ Reply to Thread
Results 1 to 5 of 5

vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

  1. #1
    Registered User
    Join Date
    03-23-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

    Hello,

    I have big data around 50,000-100000 rows.
    I want to filter out blank cells/ghost values in cells that does not hold any value but shows in count.
    To do this manually I have to filter out that columns with criteria - blanks and ALT+E+A+A that range.
    I have around 120+ columns and doing this manualy takes a lot of time.

    I tried doing this through VBA but I'm a beginner and having issues to execute the code properly.
    because my code filters out blanks and clears it but when there are no blanks in that range I do not now what to command.
    I want the algorithm to be

    Filter for blanks in column A,
    if blanks are present in range then ALT+E+A+A/ clear out the criteria range.
    If no blanks in column range then look for the blanks in column B.
    Do this process till column T.


    Thanks in advance.

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

    .
    See if this works. USE ON A COPY OF YOUR WORKBOOK FIRST !!!

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-23-2019
    Location
    India
    MS-Off Ver
    2016
    Posts
    2

    Re: vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

    It's not working.
    I want the vba code to filter out the blanks in the first column and then clear out it again. if there are no blanks in 1st column then look for blanks in the next column. It should do this process till my certified range i.e, A-J

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,014

    Re: vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

    This is the manual process ...

    Scroll to the very bottom of the sheet. Something like 1.4 million rows. Using the row numbers on the left, highlight the last 3 - 5 rows and leave them highlighted. Now scroll to the first blank row below your last row with data near the top of the sheet. Hold down the shift key and click the row number. All blank rows from top to bottom should be highlighted. Rt click in the highlighted area and select DELETE.

    That process will clear all ghost cells below your used range. Repeat the process for all workbook sheets.

    Compare the size of your files and see if the cleaned file is smaller.

    On single individual cells within your used range you can try right click the cell and select CLEAR CONTENTS.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,527

    Re: vba CODE TO FILTER OUT BLANK CELLS/GHOST CELLS and clear them

    What are the characters in your so called ghost cells?

+ 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. VBA Code to Clear Cells That Appear Blank Within a Range
    By Rizzo09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-25-2018, 04:01 AM
  2. VBA code to filter then clear visible cells
    By LilSisKin in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2017, 08:32 PM
  3. vba code to filter blank cells in a column only if the column has blanks cells
    By meus in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-28-2016, 07:05 AM
  4. VBA code need for advance filter non blank cells, paste data to another sheet
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2012, 12:15 PM
  5. Advanced filter with blank cells / Dynamic named range with blank cells
    By Jason_2112 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2010, 12:06 PM
  6. Ghost numbers in blank cells
    By scott in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-05-2006, 02:53 PM
  7. [SOLVED] Filter & clear cells
    By Tempy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-23-2005, 05:06 AM

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