Create and Rename New Worksheets for each unique cell in a column

DavisNRJr

New Member
Joined
Aug 5, 2012
Messages
29
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD]Header1[/TD]
[TD]Header2[/TD]
[TD]Header3[/TD]
[TD]Email[/TD]
[TD]Header5[/TD]
[TD]Header6[/TD]
[TD]Header7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]a[/TD]
[TD]b[/TD]
[TD]email@1[/TD]
[TD]c[/TD]
[TD]d[/TD]
[TD]e[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]b[/TD]
[TD]c[/TD]
[TD]email@2[/TD]
[TD]d[/TD]
[TD]e[/TD]
[TD]f[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]c[/TD]
[TD]?[/TD]
[TD]email@3[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]d[/TD]
[TD]?[/TD]
[TD]email@4[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]e[/TD]
[TD]?[/TD]
[TD]email@5[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]f[/TD]
[TD]?[/TD]
[TD]email@6[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]g[/TD]
[TD]?[/TD]
[TD]email@7[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD]?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

I am trying to write VBA code to loop thru the rows of an excel Worksheet(Source) as above, and use the values of each row of data in worksheet (A) to do some calculations. After that, save worksheet (C) that has results of the calculations with the name of the email "email@1, email@2, email@3 etc."

After this, save new email named worksheet in a separate workbook in a specified Directory.

After the files are produced and placed in the specified Directory, have the files emailed automatically to the email address it has been named.

Thanks for any help. I have seen so many ways to email out files, and I am challenged. Appreciate any help with this task.

Above VBA would produce
Worksheet1 in separate workbook as Worksheet named (email@1)
Worksheet2 in separate workbook as Worksheet named (email@2)
Worksheet3 in separate workbook as Worksheet named (email@3)
Worksheet4 in separate workbook as Worksheet named (email@4)
Worksheet5 in separate workbook as Worksheet named (email@5)
Worksheet6 in separate workbook as Worksheet named (email@6)
Worksheet6 in separate workbook as Worksheet named (email@7)

all saved in the same Directory specified, and then emailed out to the respective email address.
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top