+ Reply to Thread
Results 1 to 5 of 5

Trouble selecting first item in slicer

  1. #1
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Trouble selecting first item in slicer

    Hello all,

    I have a loop that cycles through every item in a slicer and performs an action. At the end of the loop I must return the slicer to its first selection. I tried multiple methods and cannot get it right.

    This is my loop

    Please Login or Register  to view this content.
    Thank you for your help.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble selecting first item in slicer

    Just run your loop in reverse to you finish with item 1. So maybe this:

    Please Login or Register  to view this content.
    Last edited by JBeaucaire; 10-30-2017 at 01:59 PM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    06-17-2012
    Location
    USA
    MS-Off Ver
    Excel 2016
    Posts
    150

    Re: Trouble selecting first item in slicer

    Thank you for your help.

    Unfortunately the code did not work. Your suggested code selects the dates in reverse order, but it selects them cumulatively. With every loop it is selecting additional dates without releasing the previous ones.

    I will have to figure it out how to make these slicers work.

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Trouble selecting first item in slicer

    I would think the same logic you applied originally would work
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Trouble selecting first item in slicer

    I made a tweak in post #2, changed the minus to plus, forgot we were cycling in reverse. Try it again.

+ 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. how to select slicer item from a range cell
    By maximeb in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2017, 10:06 PM
  2. Excel slicer remove unwanted item
    By bt123123 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-12-2016, 08:31 AM
  3. [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
  4. [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
  5. Selecting a Slicer Item in VBA
    By ManUBlueJay in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2014, 08:21 AM
  6. 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
  7. Trouble selecting a pivot table list item
    By saabman in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-08-2010, 05:36 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