Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
function to reference value selected with autofilter cm Excel Worksheet Functions 2 September 16th 09 04:56 AM
Applying an AutoFilter to a string Hardip Excel Discussion (Misc queries) 3 April 16th 06 05:32 PM
Why does AutoFilter display rows NOT selected from drop down box? Jo M Excel Discussion (Misc queries) 9 October 15th 05 01:08 AM
Autofilter selected arrow color Jon Quixley Excel Worksheet Functions 1 August 2nd 05 11:56 AM
Find out what is selected for AutoFilter Dan Excel Programming 1 July 20th 05 05:21 PM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"