LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
bpeltzer
 
Posts: n/a
Default Macro to include contents of cell

If your filtered table starts in, say, cell A10, and your filter criteria in
A1 should be applied to column A in your table, then the VBA would be
something like:
Range("A10").Select
Selection.AutoFilter Field:=1, Criteria1:=Range("A1").Value
--Bruce

"Matt" wrote:

Hi

I want to run a macro that inserts a particular variable value into a custom
filter.
I have a list of 40 names, any of which may appear in cell A1.
I need whatever that name is to be placed into a custom filter to then
display the portfolio of that person.

How do I write the macro so that is filters for the variable name in A1 each
time it changes?

Thanks

 
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
Getting contents of a cell when cell reference is in the sheet A Nelson Excel Discussion (Misc queries) 3 October 5th 05 06:46 PM
Edit macro to match entire cell contents nis75p06 Excel Discussion (Misc queries) 1 September 3rd 05 04:27 PM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
Relative Cell position NOT working with or without macro Scratching my Head Excel Discussion (Misc queries) 6 May 30th 05 06:12 PM
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM


All times are GMT +1. The time now is 10:51 AM.

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

About Us

"It's about Microsoft Excel"