![]() |
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) |
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) |
All times are GMT +1. The time now is 01:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com