Results 1 to 12 of 12

Thread: filter - hide active cell content

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    filter - hide active cell content

    hi all,
    pls. how can i change this code, that it filtering the same value as i see (format) not, what is in cell?

    now its Works this way:
    if i have in column date „21.2.09“. I want hide this date in column.
    I use autofilter but i use value 21.2.2009 not 21.02.09 and this doesnt filter nothing.
    I need it change this way, that if i use my code it will short year 09 insted 2009 because with 09 it works. If i manualy use custome filter and write 21.2.09 it works.

    How can i fix it?

    Sub filter_NEOBSAHUJE_AktivBunka()
     
        Dim col, val, ctr As Long
        col = ActiveCell.Column
        val = ActiveCell.Value
        ctr = WorksheetFunction.CountBlank(Columns(col))
            val = ActiveCell.Value
        Set FiltRng = ActiveSheet.AutoFilter.Range
        col = Selection.Column - FiltRng(1).Column + 1 '<++++++++++++
        If FiltRng.Columns.Count = 1 And col = 0 Then col = 1
        FiltRng.AutoFilter Field:=col, Criteria1:=("<>" & val)
    End Sub
    Last edited by danovkos; 08-14-2009 at 01:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •