+ Reply to Thread
Results 1 to 5 of 5

Slicer item value controles y-axis min and max vba code

  1. #1
    Registered User
    Join Date
    09-25-2019
    Location
    Friesland, nederland
    MS-Off Ver
    2013
    Posts
    3

    Slicer item value controles y-axis min and max vba code

    Hello all,


    Currently I use a pivot chart with slicer items. The slicer items are based on unique numbers. For certain numbers i would like to controle the max and min y-axis of the pivot chart without manual input.

    I tried different ways, but cannot seem to get it to work, see attachmends for the methods i used.
    I am quite new to VBA, so i hope you can help me.


    Greetings Sjoerd
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,548

    Re: Slicer item value controles y-axis min and max vba code

    Please attach an EXCEL sample of your data
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    09-25-2019
    Location
    Friesland, nederland
    MS-Off Ver
    2013
    Posts
    3

    Re: Slicer item value controles y-axis min and max vba code

    Hi,


    I added an example of the excel programming,

    Thanks in advance,
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,548

    Re: Slicer item value controles y-axis min and max vba code

    Thank you for the file.
    Can you give a detail example of the result you expect:
    For selection 2
    Min = 19 and Max 20
    Is it ??

  5. #5
    Registered User
    Join Date
    09-25-2019
    Location
    Friesland, nederland
    MS-Off Ver
    2013
    Posts
    3

    Re: Slicer item value controles y-axis min and max vba code

    Dear PCI,


    The result I expect:
    If i click nr 1 in the slicer the pivot chart should have a minimum of 14 and a maximum of 18 on the y-axis. But nothing seems to happen.
    For selection 4 in slicer i excpect min scale of 4 and maximum scale of 8.

    For selection 2
    Since i haven't set he min nor the max of the y-axis when you select 2, i expect excel will adjust this to standard settings (automatic). but we can say its 19 min and 20 max.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Limiting slicer selection to 1 item for two different slicers
    By aalbarak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2018, 12:09 AM
  2. Trouble selecting first item in slicer
    By icyrius in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-30-2017, 01:59 PM
  3. Help with the code to assign a variable to Slicer Item
    By rv02 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2016, 02:00 PM
  4. [SOLVED] Create pdf for every slicer item...vba error
    By jeroenft in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2015, 04:56 PM
  5. [SOLVED] Create pdf print of every slicer item
    By jeroenft in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-25-2015, 08:13 AM
  6. Selecting a Slicer Item in VBA
    By ManUBlueJay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2014, 08:21 AM
  7. How to auto select from a Slicer last or top item
    By xtrenge in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-07-2014, 06:22 PM

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