This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So I'm a newbie when it comes to VBA and really hit a wall when tryin to accomplish this task, even after looking at multple guides.
Let me explain what the macro should do and hopefully some of you folks could help me, it would be much appreciated.
There are two sheets in my excel file. Sheet1 contains the raw data and a pivot table that compiles certain elements from it. On Sheet2 I'd like to list some info from the pivot table. Currently I achieve this by having the correct formulas in the first row and then manually pulling them down until there is data available. However the amount of rows is always changing in the pivot and that's why I'm looking for a macro that basically pulls down the formulas until it hits the last row of the pivot table with the text "Grand Total".
Just a quick example what the formulas should look like on Sheet2:
Name | Number |
---|---|
=Sheet1!B2 | =Sheet1!C2 |
=Sheet1!B3 | =Sheet1!C3 |
I tried to set up some kind of looping macro that stops once it hits "Grand Total" but I couldn't quite manage. And I know that this might be an overkill, because I could just have the pivot showing, but in the real file the formulas pull data from two more different sheets as well, so while it could be done, it's not that simple unfortunately. And this "pull down until there is data" function would be very useful for me in other areas too, so I'd like to know how it could be achieved.
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/vba/comment...