Coming soon - Get a detailed view of why an account is flagged as spam!
view details

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.

2
How could I make a macro that pulls down formulas until it reaches a certain text?
Post Flair (click to view more posts with a particular flair)
Post Body

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.

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
11,635
Link Karma
10,429
Comment Karma
921
Profile updated: 4 days ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago