Results 1 to 2 of 2

change slicer seletion based on cell value

This is a discussion on change slicer seletion based on cell value within the Excel Questions forums, part of the Question Forums category; Hi guys, Idk if this is even possible. Is there a way to programatically change the slicer selection based on ...

  1. #1
    Board Regular
    Join Date
    Jun 2008
    Location
    London
    Posts
    368

    Lightbulb change slicer seletion based on cell value

    Hi guys,

    Idk if this is even possible.

    Is there a way to programatically change the slicer selection based on cell value.

    Lets say, if the Cell A1 = 1, select A, B and C in slicer. if 2 then D,E and F and so on.

    I have 12 conditions (1 to 12) in the drop down box.

    Thanks in advance.

    Regards,
    A
    Macr

  2. #2
    MrExcel MVP Jerry Sullivan's Avatar
    Join Date
    Mar 2010
    Location
    San Diego, California
    Posts
    6,784

    Default Re: change slicer seletion based on cell value

    Hi A,

    Yes, that can be done.

    You can get a good framework for that by using the macro recorder to record your manual steps.

    If you'd like some help with that please..
    1. Provide the name of the Slicer
    2. Clarify the mapping between the value in A1 and the Slicer Items to be Selected. (you provided an example, but you'll run out of letters before getting to A1=12). Can you provide an example that is more like your actual case? If there isn't a clear pattern like your example, you'll need to store the mapping somewhere (perhaps in the VBA code itself, or in a lookup table in your workbook).
    Using Excel 2010, 2013

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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


DMCA.com