Copying Certain Worksheets depending on certain criterion

  • Thread starter Andy_N1708 via OfficeKB.com
  • Start date
A

Andy_N1708 via OfficeKB.com

I have an excel file that contains multiple templates that I need to copy
depending on certain criterion. I have set up two columns for this purpose.
The first column contains the names of the worksheet to be made and the
second column will be which template to copy. I have been trying to figure
out a way but stuck and would appreciate it if you guys can help. The pseudo
code of what I'm trying to do is as follow:

Loop
if cell A is not null and cell B is null copy template 1,
else if cell A is not null and cell B is "Temp 1" copy template 2
else if cell A is not null and cell B is "Temp 2" copy template 3
else if cell A is not null and cell B is "Temp 3" copy template 4
else if cell A is not null and cell B is "Temp 4" copy template 5
end loop

Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top