bobkap
Active Member
- Joined
- Nov 22, 2009
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
- Mobile
- Web
I'm thinking that this is probably simple but I'm stumped and would appreciate any help.
In a macro I am writing I have a long column of customer names that are already sorted and many of the names are repeated in various numbers of rows. (Example below) I need to separate and group each customer so that I can then copy the rows to their own worksheet, but I cannot think of the best way to write the code to do this.
ABC Co
ABC Co
ABC Co
XYZ Co
XYZ Co
QRS Co
QRS Co
QRS Co
QRS Co
So, I need to copy the row of data for each company to another worksheet, but FIRST I have to figure out how to go through each row of data and identify when the company name changes and THEN go back and capture the data for that one company.
In a macro I am writing I have a long column of customer names that are already sorted and many of the names are repeated in various numbers of rows. (Example below) I need to separate and group each customer so that I can then copy the rows to their own worksheet, but I cannot think of the best way to write the code to do this.
ABC Co
ABC Co
ABC Co
XYZ Co
XYZ Co
QRS Co
QRS Co
QRS Co
QRS Co
So, I need to copy the row of data for each company to another worksheet, but FIRST I have to figure out how to go through each row of data and identify when the company name changes and THEN go back and capture the data for that one company.