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

  • Thread starter Thread starter mcnaught@lincoln
  • Start date Start date
M

mcnaught@lincoln

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)
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top