Hi,
I have an excel sheet that contains ID and Name. Please see the attached excel sheet Macro Sample.xls
In it I have the main excel sheet called "Database" and I would like a macro to do the following:
a) To filter data in the database sheet. I want it to filter using the string length of the different "Name" column. Only if the string length is greater than equal to 3 should it filter the data by that criteria.
b) After filtering the data on that criteria it should paste it in the worksheet having the same name as the filtered criteria.
c) After pasting in the pertinent sheet the data it should group the files in that worksheet using the ID criteria. (Only ID less than 30 should be grouped using the Data-Group and outline-group option.
After copying in each cell it should stop.
This can be done by manually recording a macro and then running it. But this hard coding has the limitation that in case I have a new dataset not encountered earlier i would need to re-record the macro again.
Is there a smarter way to do this using VBA code?
I understand that looping can work wonders in this but how do I get it to work?
Thanking you in advance.
Warm Regards,
Kallol
Bookmarks