HomeОбразованиеRelated VideosMore From: Dinesh Kumar Takyar

How to Update PivotTable When Source Data in Excel Worksheet Changes Using VBA

166 ratings | 63097 views
Our Excel training videos on YouTube cover formulas, functions and VBA. Useful for beginners as well as advanced learners. New upload every Thursday. For details you can visit our website: http://www.familycomputerclub.com Today we learn how to update the PivotTable when the source data in the Excel worksheet changes using VBA.
Html code for embedding videos on your blog
Text Comments (41)
The Marwan (4 months ago)
great vid, but it doesnt work when i re open the file , please any suggestions ?
Dinesh Kumar Takyar (4 months ago)
Check your code!
Tumi Saku (5 months ago)
Thanks. Your information is always useful and clear.
Sbo Ndwandwe (1 year ago)
Nice video. But I have a question. If I add rows will this still work?
The Marwan (4 months ago)
only the highlighted raw data will update, so you have to highligh blanks too in order to add in the future
Dinesh Kumar Takyar (1 year ago)
What did you try?
Romi Patel (1 year ago)
Will that refresh if you add new row to the source data
priyanka sharma (1 year ago)
my excel data is too lagre. while creating pivot through VBA , it is working on one computer but not working on another. pls suggest
Vinicius Palamim (1 year ago)
hello, do u know how can i use all this in google finance? cuz ,I think that google finance does not accept vba.. thks
Dinesh Kumar Takyar (1 year ago)
Get the book Excel 2016 Power Programming with VBA: http://amzn.to/2kDP35V If you are from India you can get this book here: http://amzn.to/2jzJGqU Or visit https://www.exceltrainingvideos.com to learn more for free.
Sujin V (1 year ago)
Thanks for such a video. But I tried the same in my sheet and it is not getting updated automatically. I'm unable to identify what the problem is. Everything in my code is exactly the same as per your video except for the pivot table number. But it doesn't work. What could be the issue? Please help.
Dinesh Kumar Takyar (1 year ago)
Check out this link: http://www.exceltrainingvideos.com/how-to-update-pivottable-when-source-data-in-excel-worksheet-changes/
Joanne Tran (2 years ago)
I love you....Thank you for saving me lot of time.
Tyler Garrison (2 years ago)
Thank you!!!
Tonette An (2 years ago)
your videos are very helpful. I want to ask how can I do the auto update of pivotTable in other workbook and the source data was on another workbook?
Tonette An (2 years ago)
and I also use slicer tools to navigate the pivotcharts
Nnedix (2 years ago)
Now does this apply when you add additional cells to your table?
stackattackwildcat (2 years ago)
How do you find the pivot table index number. Also what if I'm using my pivot table on a separate sheet which sheet do I need to view code
Yeng Roth (2 years ago)
Yes it is really Sir, what are you doing is so useful to the people around the world !
Yeng Roth (2 years ago)
Yes, sir i am a staff im jarmemt factory, do some report in excel
Dinesh Kumar Takyar (2 years ago)
+Yeng Roth015 Thank you!
Yeng Roth (2 years ago)
Can you explain more clear than this Sir ? because i just learn how to use VBA code from your youtube sir , so met a lots of problems.
Yeng Roth (2 years ago)
I want to build the smart form Excel
Yeng Roth (2 years ago)
I really need your help PLease
Yeng Roth (2 years ago)
Dear, Sir  Please, can you help me to make one video click in VBA excel code ( when i search and copy data come and i edit that data and i sent data back the place i call come
Dinesh Kumar Takyar (2 years ago)
+Yeng Roth015 Check this link out:  http://www.exceltrainingvideos.com/how-to-update-pivottable-when-source-data-in-excel-worksheet-changes/
Muhammad Arshad (2 years ago)
Indeed Very useful and easily taught
Abdoul Khadre Fofana (3 years ago)
Thank you for what you're doing, its very helpfull
Agustin Jr. Timay (3 years ago)
I received an error message when I input the the the VBA. How will I solve the problem.
Ramana kandregula (3 years ago)
Hi sir, it is working fine " Me.PivotTables(1).RefreshTable" but if i using " ActiveSheet.PivotTables("pivottable1").PivotCache.Refresh" Run time error 1004 is showing as.Unable to get the PivotTables property of the Worksheet class. My data and table are same sheet.. Please suggest me on this... thanks in advance sir.
Brian Rumaguera (2 years ago)
+Ramana kandregula Youre the best. Your code works fine : )
Sachin Shetty (3 years ago)
I have a pivot data in which date field is there. my problem is i have to select date between 1st to 16th june but when my data contains 17thJune or further  it throws an error. Currently i'm manually unticking those dates. Is there any code for that which automatically unticks or ticks pivotitems
Bradley Cathie (3 years ago)
Hi Dinesh, I tried with many other codes that did not work. Yours was the easy to understand and worked perfect. Thanks.
Paul Taylor (3 years ago)
Dear Dinesh, I cannot get this to work when the data are on a separate work sheet. Error 1004 - Unable to get the PivotTables property of the Worksheet class.Any thoughts please?? Many thanks.
Yallapragada Alluraiah (3 years ago)
+Paul Taylor Hi It will work even if your data is in other sheet ..like this Assuming your data is in sheet "Data1" and your table is in "Metrics" sheet ****write this following code in "Data1" sheet********* Private Sub Worksheet_SelectionChange(ByVal Target As Range) Sheets("Metrics").PivotTables("pivotTable1").PivotCache.Refresh End Sub
Michael Rygaard (3 years ago)
Im getting the same
Rory Schnacky (3 years ago)
Great Instruction. Thank You.
chris nano (4 years ago)
Good day sir. Im working for a library system. I have few problems that I can't resolve. I have two worksheets (BorrowedBooks & ReturnedBooks )  and a form (Return Book). When you return a book and  theirs a matching data from borrowed books, that data should be deleted in the borrowed books sheet and will be saved in returned books sheet. Please help me to overcome this problem. Here's my email address [email protected] Thank you!
chris nano (4 years ago)
Can I ask for you email address sir ? I've got some question to ask. Thanks :)
MUSTAFA BAKKAL (4 years ago)
yes we need to how we can change the pivot table when ti data sourched changes ? if you can upload a video about it woull be very usefull thx 
JD21O (4 years ago)
Please, How to make a refresh when data rows increases or decreases?

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.