ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to create pivot table from large data file (https://www.excelbanter.com/excel-programming/369801-macro-create-pivot-table-large-data-file.html)

johnson748r

Macro to create pivot table from large data file
 

I need to automate the creation of a pivot table from a csv file. I
create the pivot table once a week, and the number of records in the
csv file increases each time. I have not had much success in creating a
macro that includes a statement to go to the end of the data to
accomodate the increased number of rows. Can anyone assist with the
correct vba statement?


--
johnson748r
------------------------------------------------------------------------
johnson748r's Profile: http://www.excelforum.com/member.php...o&userid=37093
View this thread: http://www.excelforum.com/showthread...hreadid=569689


Die_Another_Day

Macro to create pivot table from large data file
 
Here is one good way to find the last row with data in it:
LastRow = Cells.Find(What:="*", After:=[A1], _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row

HTH

Charles_Chickering
"johnson748r"
wrote in message
...

I need to automate the creation of a pivot table from a csv file. I
create the pivot table once a week, and the number of records in the
csv file increases each time. I have not had much success in creating a
macro that includes a statement to go to the end of the data to
accomodate the increased number of rows. Can anyone assist with the
correct vba statement?


--
johnson748r
------------------------------------------------------------------------
johnson748r's Profile:
http://www.excelforum.com/member.php...o&userid=37093
View this thread: http://www.excelforum.com/showthread...hreadid=569689





All times are GMT +1. The time now is 10:53 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com