VBA macro to filter, copy, paste as values and save each sheet separately between 2 workbooks?

Viewed 31

So I get data for multiple cities in one aggregated file with the table headers starting in b8, ending j8, but each month the number of rows with data may change, after which i need to paste each cities’ data in existing worksheets in an already existing workbook with a special format.

The cities are the same every time, theres 6 of them, so the workbook i need to paste them in already have the same name (however, the city data is in full caps while the worksheets in the final tenplate are not).

I have almost 0 knowledge of VBA, and googling gave me 50 websites with the same title and every single one with different code. I am getting a migraine just thinking of going down the rabbit hole again. Can anyone help?

Here is the pseudocode i thought of so far:

in active worksheet Select table b8:j8 and down

Apply filter, by column city

For each city:

Filter by city

Count nr of rows, store as x

Copy filtered rows

Paste to sheet city starting in c10

Completely remove rows from 10+x+1 until 197 in sheet city

0 Answers
Related