+ Reply to Thread
Results 1 to 9 of 9

Macro to activate a filter on another sheet

  1. #1
    Registered User
    Join Date
    05-27-2008
    Location
    Milano, Italy
    Posts
    21

    Macro to activate a filter on another sheet

    Hi everybody,

    I would like to know if is it possible create a macro activated by a certain array...

    For example: when i put in a certain coloumn a certain array (for example "apple") the macro should start and activate a filter in another spreadsheet...

    I don`t know what i`ve to put before

    Please Login or Register  to view this content.
    Thanks for help
    Last edited by VBA Noob; 05-28-2008 at 01:32 PM.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    The_jackal,

    Thread moved to programming and code wrapped for you this time.

    Please read the forum rules below and confirm yo understand them

    This can be done. Can you provide a sample workbook

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    05-27-2008
    Location
    Milano, Italy
    Posts
    21
    I attached the samples...i nd that when i write "orange" in spreadsheet2 the filter in sheet1 update itself in the way to have always updated data
    Thank you
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Right click sheet 2 > select view code > paste in the below

    Please Login or Register  to view this content.
    HTH

    VBA Noob

  5. #5
    Registered User
    Join Date
    05-27-2008
    Location
    Milano, Italy
    Posts
    21
    The macro works very good, but I would like to activate the filter only with the word "orange"...
    I tried to change the criteria but i didn`t succeed in...

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Remove the ' if you need the message

    Please Login or Register  to view this content.
    VBA Noob

  7. #7
    Registered User
    Join Date
    05-27-2008
    Location
    Milano, Italy
    Posts
    21
    Now the macro works in the way that i like....but if I try to apply it in the real document it doesn`t work..I`ve changed the values and this is the resulting

    Please Login or Register  to view this content.
    I attached a sample of the document with the real spread sheet name and the right coloumns and formulas...where is the mistake?

    Thanks for your help
    Attached Files Attached Files

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-27-2008
    Location
    Milano, Italy
    Posts
    21
    Now works properly, the only thing I had to change was the field (from 1 to 4) otherwise the "Re-weighting" activated the coloumn A filter...
    Thank you a lot

    Please Login or Register  to view this content.
    Last edited by VBA Noob; 05-30-2008 at 11:00 AM.

+ 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