+ Reply to Thread
Results 1 to 2 of 2

Macro to include contents of cell

  1. #1
    Matt
    Guest

    Macro to include contents of cell

    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

  2. #2
    bpeltzer
    Guest

    RE: 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1