tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
[TABLE="class: grid, width: 500, align: center"]
<TBODY>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]NAME[/TD]
[TD]EMAIL[/TD]
[TD]COMPANY[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]jo smith[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BOB[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BILL[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]PAUL[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]JOHN[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]BOB[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]DAVE[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]LUO[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]TIM[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]TREV[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]JO[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]JIM[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]MIKE[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
</TBODY>[/TABLE]
HI EVERYONE,
I'm at a total loss so really hope someone can help with this?
I have a spreadsheet and a tab called "s1"
like the above it has a list of companies with employees and emails, now what I need to do is find a way to create individual csv files for each company?
the company names are in column C and are sorted in order so all smiths are together,
I'm looking for a macro so I can take the data, save it into a csv file with the heading Column A "name" Column B "email" Column C "Company"
for each unique name so from above id have one file for SMITH, JONES AND DAVIS with all there employee's in there file.
I can't even get close to this?
I know it can be hard to understand my descriptions sometimes so heres what I need the macro to do if I was writing it in English:
look in column C, copy all the names that match the name in cell C2 along with all the data from the column A and B, and paste it into a csv file with the headings as stated above,
the save this file in the same folder the master spreadsheet was in under the company name.
then once you have done this find the next name in column C and copy this data into its own csv file and continue doing this until all the names have been saved to a file, then stop.
would anyone be able to give me the code I need to do this, I've tried recording it and doctoring it but its not working,
please help
Thanks
Tony
<TBODY>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]NAME[/TD]
[TD]EMAIL[/TD]
[TD]COMPANY[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]jo smith[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]BOB[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]BILL[/TD]
[TD]@[/TD]
[TD]SMITHS[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]PAUL[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]JOHN[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]BOB[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]DAVE[/TD]
[TD]@[/TD]
[TD]JONES[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]LUO[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]TIM[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]TREV[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]JO[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]JIM[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]MIKE[/TD]
[TD]@[/TD]
[TD]DAVIS[/TD]
[/TR]
</TBODY>[/TABLE]
HI EVERYONE,
I'm at a total loss so really hope someone can help with this?
I have a spreadsheet and a tab called "s1"
like the above it has a list of companies with employees and emails, now what I need to do is find a way to create individual csv files for each company?
the company names are in column C and are sorted in order so all smiths are together,
I'm looking for a macro so I can take the data, save it into a csv file with the heading Column A "name" Column B "email" Column C "Company"
for each unique name so from above id have one file for SMITH, JONES AND DAVIS with all there employee's in there file.
I can't even get close to this?
I know it can be hard to understand my descriptions sometimes so heres what I need the macro to do if I was writing it in English:
look in column C, copy all the names that match the name in cell C2 along with all the data from the column A and B, and paste it into a csv file with the headings as stated above,
the save this file in the same folder the master spreadsheet was in under the company name.
then once you have done this find the next name in column C and copy this data into its own csv file and continue doing this until all the names have been saved to a file, then stop.
would anyone be able to give me the code I need to do this, I've tried recording it and doctoring it but its not working,
please help
Thanks
Tony