+ Reply to Thread
Results 1 to 2 of 2

Filter list in place if a cell has a keyword within a formula

  1. #1
    mcnaught@lincoln
    Guest

    Filter list in place if a cell has a keyword within a formula

    Hi,
    Don't know if this can be done but i'd like to be able to filter a list
    that has a keyword within a cell formula.

    EG I'd like to filter all the rows that have a vlookup function

    Is this possible?

    Thanks in advance

    Peter


    PS
    My current code filters the results from a formula:
    Range("Database").AdvancedFilter Action:=xlFilterInPlace,
    CriteriaRange:= _
    Workbooks("Lookup Tables.xls").Sheets("Opening
    Screen").Range("CriteriaTravel"), Unique:=False

    The Range "CriteriaTravel":
    =OR(COUNTIF(D3,"*travel*")=1,COUNTIF(D3,"*mileage*")=1)


  2. #2
    Rowan
    Guest

    Re: Filter list in place if a cell has a keyword within a formula

    Seeing as you didn't get any better answers maybe this will do.
    "Filters" column A.

    Sub hide()
    Dim eRow As Long
    Dim ColA As Range
    Dim cell As Range

    eRow = Cells(Rows.Count, 1).End(xlUp).Row
    Set ColA = Range(Cells(2, 1), Cells(eRow, 1))
    ColA.EntireRow.Hidden = False
    For Each cell In ColA
    If Not cell.FormulaR1C1 Like "*VLOOKUP*" Then
    cell.EntireRow.Hidden = True
    End If
    Next cell
    End Sub

    Regards
    Rowan

    mcnaught@lincoln wrote:
    > Hi,
    > Don't know if this can be done but i'd like to be able to filter a list
    > that has a keyword within a cell formula.
    >
    > EG I'd like to filter all the rows that have a vlookup function
    >
    > Is this possible?
    >
    > Thanks in advance
    >
    > Peter
    >
    >
    > PS
    > My current code filters the results from a formula:
    > Range("Database").AdvancedFilter Action:=xlFilterInPlace,
    > CriteriaRange:= _
    > Workbooks("Lookup Tables.xls").Sheets("Opening
    > Screen").Range("CriteriaTravel"), Unique:=False
    >
    > The Range "CriteriaTravel":
    > =OR(COUNTIF(D3,"*travel*")=1,COUNTIF(D3,"*mileage*")=1)
    >


+ 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