+ Reply to Thread
Results 1 to 24 of 24

Select item of a dropdown list (data validation) and refreshes values of all pivot tables

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Select item of a dropdown list (data validation) and refreshes values of all pivot tables

    Hi gurus,

    I have a dropdown list, made with data validation, and I would like that all my pivot tables get automatically updated with the selection of the item.

    Currently, I need to hit the refresh button to get them refreshed with the selection. Is there any wayt to automate this?

    Many thanks!!!

  2. #2
    Registered User
    Join Date
    02-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Try this,

    Please Login or Register  to view this content.
    Last edited by Fotis1991; 02-07-2014 at 11:19 AM. Reason: So as you choosed to ignore my rewuests...

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    chinraj



    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Thanks!

    However my pivots are all accross my worksheet. Is it possible to apply this to the entire worksheet?

  5. #5
    Registered User
    Join Date
    02-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Regret the inconvenience caused. I’ll ensure this henceforth. thanks

  6. #6
    Registered User
    Join Date
    02-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    yes. this applies to whole sheets in the workbook.

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Quote Originally Posted by chinraj View Post
    Regret the inconvenience caused. I’ll ensure this henceforth. thanks
    You have to add code tags in your code. Pls do it!

  8. #8
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Mmmmm I have just used it and unfortunately there must be something that I do wrongly but my pivot tables do not get updated (refreshed) when the selection is made.

    I have put the code in workbook/view code/

    I still need to hit the refresh button if I want to see my pivot tables and pivot charts updated.

  9. #9
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    So, is there anyone who could help me with this??

    Thanks!

  10. #10
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Hi there,

    I need help with this, I don't know why the code above does not work refresh my pivot tables???

  11. #11
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    put some dummy data in your excel file and upload it. This way its very easy to look whats wrong. Gonna have a look later
    Say thanks, Click *

  12. #12
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Hi there,

    Attached an example with the suggested macro.

    Follow this to reproduce the issue.

    1. Go to the 'Charts' tab and check how the chart looks.
    2. Go to 'Data Validation' tab and choose a country. (do not refresh!)
    3. Go back to 'Charts' and you will see that the pivot chart did not update. The source of this pivot chart is on the "PIVOTSCHARTS" tab, which does not update either.

    Many thanks for any help!
    Attached Files Attached Files

  13. #13
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Right-click Data validation tab, select 'View code' then you may add this code:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  14. #14
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Hi,

    I have tried and it seems not to work with the example??

    Thanks!

  15. #15
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Hi,

    I have tried and it seems not to work with the example??

    Thanks!

  16. #16
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    It works here but I do not use Excel 2007. Does anything happen at all?

  17. #17
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    No, nothing happens....? I am using 2010, any clue??

  18. #18
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    I think you have put code in wrong place then - it must be in module for Data validation sheet. Also for 2010 you must replace Add2 with Add:
    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    I works with the example, even when not replacing Add2 (which I do not where to replace it, I do not see it in the code...?)
    However, when using the code above with my file and replacing names and cells (instead of b2, c10). I get the following error on this specific line.
    **************
    Run-time error "438":
    Object doesn't support this property or method.
    ***************

    The name of my tab is Pivot master data and replace in the code with "Replace master data".... Also, I am pasting the code in the sheet where I have the validation..

    What am I doing wrong?

    Thanks a lot!

  20. #20
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    What is actual code you are using?

  21. #21
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Please Login or Register  to view this content.

  22. #22
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    This is not correct:
    Please Login or Register  to view this content.
    It must be:
    Please Login or Register  to view this content.

  23. #23
    Registered User
    Join Date
    11-12-2013
    Location
    Geneva
    MS-Off Ver
    Excel 2007
    Posts
    59

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    THANKS A LOT!!!!!

    I should have noticed that before...What a change, it works now, of course!!!! Perfect! Loving it!

  24. #24
    Registered User
    Join Date
    02-27-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    77

    Re: Select item of a dropdown list (data validation) and refreshes values of all pivot tab

    Quote Originally Posted by siroco79 View Post
    Hi,

    I have tried and it seems not to work with the example??

    Thanks!
    I have modified some codes and attached here. This will get auto-refresh at every five seconds. You can change the timer setting in Module1.

    This works fine.

    -chinraj-
    Attached Files Attached Files

+ 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. macro to select each item in data validation list
    By Olivia Wong in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-30-2013, 01:59 PM
  2. Macro to select an item from a data validation list
    By blindedbythepj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-12-2012, 03:53 PM
  3. Replies: 1
    Last Post: 06-11-2012, 04:43 AM
  4. [SOLVED] Pivot tables- putting more than two field list item into the data
    By Driver in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 01:15 PM
  5. [SOLVED] Pivot Tables, can I use an external list to select data items?
    By Brian Lofquist in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-04-2005, 03:06 PM

Tags for this Thread

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