+ Reply to Thread
Results 1 to 5 of 5

show blank in filter in active column

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-18-2008
    Location
    Slovakia
    MS-Off Ver
    Office 2016
    Posts
    162

    show blank in filter in active column

    Hi pls. i try to create vba code, which will filter blankc cell in column where is cursor.
    this is my try, but it doesnt works.
    whats wrong please?
    Sub filter_show_BLANK()
    '
    ' filter_show_all Macro
       If ActiveSheet.FilterMode Then
       ActiveSheet.ShowBLANKSdata
    or i try
       ActiveSheet.AutoFilter Field:=1, Criteria1:="<>"
    End If
        
    End Sub
    Last edited by danusko; 02-20-2009 at 10:27 AM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: show blank in filter in active column

    Maybe

    Columns(ActiveCell.Column).AutoFilter Field:=1, Criteria1:="<>"
    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    12-18-2008
    Location
    Slovakia
    MS-Off Ver
    Office 2016
    Posts
    162

    Re: show blank in filter in active column

    thx for quick answer but i dont know if it works as i mean.
    Look at atach. It filtered blanks in first column. And i want filtering the column where i am active.

    did i something wrong?
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: show blank in filter in active column

    Try

    Columns(ActiveCell.Column).AutoFilter Field:=ActiveCell.Column, Criteria1:=""
    VBA Noob

  5. #5
    Forum Contributor
    Join Date
    12-18-2008
    Location
    Slovakia
    MS-Off Ver
    Office 2016
    Posts
    162

    Re: show blank in filter in active column

    yes, it works perfect.
    thanke you

    please where can i find this information, that i dont need to trouble to you? because i found it in vba Object Browser and definition, but there is it not

+ 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