+ Reply to Thread
Results 1 to 5 of 5

Macro to Clear All from Non Visible Cells

  1. #1
    Registered User
    Join Date
    01-26-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro to Clear All from Non Visible Cells

    I am looking for a macro that will do a clear all on all Non Visible Cells in a worksheet.

    Thank you,

    Tim

  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,259

    Re: Macro to Clear All from Non Visible Cells

    Hello Tim,

    Welcome to the Forum!

    What do you mean by "non visible"? Cells that are hidden or cells that are part of a filtered list like you see with AutoFilter?

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-26-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro to Clear All from Non Visible Cells

    I am using a VBScript to pull data from two columns (A and B) in excel. This data is either copied and pasted or type into the two columns. Unfortunately if there is any non visible data characters in any of the cells it will throw a type mismatch 13 error. The only way I can get it to work is if I highlight cells that do not have visible data in them and do a clear all. I was hoping for some type of macro that would do a clear all on all cells that were not visible.

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

    Re: Macro to Clear All from Non Visible Cells

    Hello teynon,

    If you post your code, I see what the is causing the error.

    Sincerely,
    Leith Ross

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro to Clear All from Non Visible Cells

    Maybe using the Clean Function
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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