NigelExcel
New Member
- Joined
- Jan 2, 2025
- Messages
- 3
- Office Version
- Prefer Not To Say
- Platform
- Windows
I am trying to create a macro that will enable me to search through the sorted values in column A, find all of the cells that contain the same value, and then copy those rows of information to a new file at a specified path and save it as the name of the value.
For example:
A1= cat
A2= cat
A3 = dog
A4 = horse
A5 = horse
A6 = horse
The macro would start in cell A1, find the value of cell A1 in A2, copy the information in rows 1 & 2 to a new file and save it as cat.
Then it would continue the loop in A3, not find any other matching cells, copy the information from row 3 to a new file and save it as dog.
The same process would repeat again for A4-A6 and be saved as horse.
This is a bit beyond my current skill level so any help would be appreciated. Any helpful links would be great as well.
For example:
A1= cat
A2= cat
A3 = dog
A4 = horse
A5 = horse
A6 = horse
The macro would start in cell A1, find the value of cell A1 in A2, copy the information in rows 1 & 2 to a new file and save it as cat.
Then it would continue the loop in A3, not find any other matching cells, copy the information from row 3 to a new file and save it as dog.
The same process would repeat again for A4-A6 and be saved as horse.
This is a bit beyond my current skill level so any help would be appreciated. Any helpful links would be great as well.