Hello,

I'm new to writing code but I'm looking at automating tasks at work. Currently, we run a report each morning and download the data into Excel. The data always has the same number of columns, but the row numbers always change. One day it could be 135,000, the next it could be 140,000.

I have to spend five minutes generating a pivot and formatting the data.

What code do I use when selecting a changing number of rows?

It's a small project I'm doing in my spare time to automat a lot of Excel tasks at work.

Thanks for your help,

Lee.