Macro: Selection and copy till last row

New Contributor

New to macros. What I am trying to do is create pivot tables from a source data [This is done successfully]. Next I want to copy the data from pivot tables to a new sheet and create charts. I have successfully recorded this for a sample sheet and after making some changes in the VBA code it is working fine in the sample sheet. When I run the code in a new sheet with larger number of rows, it is selected rows equal to sample sheet and not giving correct charts. So the solution is needed for 2 things:

1. Selection of rows from pivot table till the last row for copying in new sheet

2. Making bar graph from the copied data in new sheet but automatically detecting the rows

 

0 Replies