Autofilter - =string in selected cell
Sub Autofilter()
Selection.AutoFilter Field:=5, Criteria1:= _ "=NPF", Operator:=xlAnd End Sub How can I amend above code to replace NPF with the contents of my active cell (E.g either by Application.InputBox type := ??? or replace NPF by activecell.content ???) Thxs |
Autofilter - =string in selected cell
did you try activecell.value ?
-- Gary "al007" wrote in message ps.com... Sub Autofilter() Selection.AutoFilter Field:=5, Criteria1:= _ "=NPF", Operator:=xlAnd End Sub How can I amend above code to replace NPF with the contents of my active cell (E.g either by Application.InputBox type := ??? or replace NPF by activecell.content ???) Thxs |
Autofilter - =string in selected cell
Yes - I managed to make it work with active value but not if selected
filter contains date - Can anybody help pls. Thxs |
Autofilter - =string in selected cell
You could try
activecell.value2 as your criteria. al007 wrote: Yes - I managed to make it work with active value but not if selected filter contains date - Can anybody help pls. Thxs -- Dave Peterson |
All times are GMT +1. The time now is 03:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com