0
You guys, good night
I have a problem in VBA, can help me please. Follow:
I have an excel with Sheet1 and Sheet2. At Sheet2 I have a list of clients where I have the following data: Name, City and Age.
In VBA, I need to copy the data of Sheet2 and paste in Sheet1 based on some filters, for example where the City is equal to "São Paulo".
An example of the result would be, in Sheet1, to copy the data where the city is equal to São Paulo, so would João and Manuel.
Some points that can be a hindrance: 1 - I do not know the number of lines of the Sheet2 register. For example, as shown above, the register has 4 records, but could have 200. In that case I don’t know beforehand how many lines you have.
2 - In the register, it may be that between two records have blank lines. For example, between Manoel and Carlos' record, there’s a blank line.
Thank you.
I suggest you put an example image, to facilitate the understanding of how your data is arranged in the spreadsheet..
– dot.Py
I don’t quite understand.. you would like to create a macro where you pass a filter and it copies the data from plan2 to plan1?
– dot.Py
I edited the question by putting an image of what the data would look like. In case I don’t know how many records you have in Sheet2 and can also contain blank lines between records.
– bbariotti