+ Reply to Thread
Results 1 to 9 of 9

Expanding a field when a slicer option is selected

  1. #1
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Expanding a field when a slicer option is selected

    Hi All,

    Is it possible to expand a row when you select a slicer option?

    I have 10 cost centres and 120 names grouped over the cost centres.

    I only want to show the 10 rows until I click an option on the slicer then I would like to expand the selected cost centre to show the name.

    Is this possible in VBA or am I missing a setting somewhere?

    Thank you

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Expanding a field when a slicer option is selected

    Are you implying that the Pivot Table on which the Slicer is based has the column containing the names hidden?
    Otherwise when you use the Slicer for the cost centres you'll see the names.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Expanding a field when a slicer option is selected

    Hi Richard,

    See attached pictures. I have the names collapsed, I would like to expand when the cost centre is selected on the slicer.

    Picture 1 is the table with how I want it to look when all cost centres are showing.

    Picture 2 is how I want it to look when I select a specific cost centre. But currently it only shows picture 3.
    Attached Images Attached Images
    Last edited by Farley945; 11-19-2021 at 04:28 AM. Reason: Updated pictures

  4. #4
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Expanding a field when a slicer option is selected

    Has anybody got any idea if this is possible?

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Expanding a field when a slicer option is selected

    Please upload a workbook or a representative cut down copy, anonymised if necessary. It is always easier to advise if we can see your request in its context.

    Show a before and after situation with manually calculated results, explaining which information is data and which is results, and if it's not blindingly obvious how you have arrived at your results some explanatory notes as well.

    To upload a file click the Go Advanced button at the foot of your post, look underneath the post area for the Manage Attachments section and take it from there.

  6. #6
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Expanding a field when a slicer option is selected

    See attached workbook.

    I chose option 1 on the slicer to generate the result in the table below.

    When I select and Dept. I want all the names to expand within the chosen department.

    When I clear the filter I want to show all departments with the names collapsed

    Thank you
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Expanding a field when a slicer option is selected

    The below is as far as I have got. I can have it so all the fields show the "Name" column, but if I add
    Please Login or Register  to view this content.
    it crashes my Excel.

    Please Login or Register  to view this content.

  8. #8
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Expanding a field when a slicer option is selected

    Not sure I still understand but maybe

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    11-05-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    155

    Re: Expanding a field when a slicer option is selected

    Hi Richard,

    Thank you that's perfect, I changed the
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Now it will collapse and expand when a number is chosen!

    Thank you!

+ 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. Show value of highest slicer selections (multi selected items in slicer
    By saudi_red_neck in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-01-2020, 05:37 AM
  2. Replies: 3
    Last Post: 11-18-2019, 09:32 AM
  3. Replies: 1
    Last Post: 06-12-2019, 03:48 PM
  4. [SOLVED] Run macro to change pivot table row field when user selected a slicer item
    By Chrispelletier in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2016, 09:44 AM
  5. Group option and calculated field option greyed out on pivot table
    By KevinMolina in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-16-2015, 05:00 PM
  6. Two different Pie Charts based on selected slicer field
    By superglenntot in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 06-10-2014, 03:56 AM
  7. Two different Charts based on selected slicer field
    By superglenntot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-10-2014, 02:03 AM

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