creating new sheets from other sheet

Traines

New Member
Joined
Feb 26, 2008
Messages
31
Hi folks,

I need a little help ...

I have a list of test case on the 1st sheet of a workbook. The 2nd and 3rd tabs contain other information. What I would like to do is to create a sheet for each test case. The 1st test case would be the 4th sheet in the workbook. I have created a named range called 'test_array' on sheet 1. It has 78 rows (test cases) and 9 columns (Test #, Test Title, Function, Tester, Test Details, Requirements, Duration, Results, Comments)

Each test case sheet should have the following:
1) sheet name should be "Test #" & Test # from test_array
2) Cell B1 = 'Test #' from test_array
3) cell B2 = 'Test Title' from test_array
4) cell B3 = 'Test Details' from test_array

I should end up with a workbook with 81 tabs (3 original plus 78 testcase tabs.

Can you help?

Thanks,
Tod
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

is this working as expected?

Code:
Sub ADD_SHEETS()
    For MY_ROWS = 2 To Range("A" & Rows.Count).End(xlUp).Row
        MY_NO = Range("A" & MY_ROWS).Value
        MY_TITLE = Range("B" & MY_ROWS).Value
        MY_DETAILS = Range("E" & MY_ROWS).Value
        Sheets.Add After:=Sheets(ActiveWorkbook.Sheets.Count)
        ActiveSheet.Name = "TEST " & MY_NO
        Range("B1").Value = MY_NO
        Range("B2").Value = MY_TITLE
        Range("B3").Value = MY_DETAILS
        Sheets("Sheet1").Select
    Next MY_ROWS
End Sub
 

Traines

New Member
Joined
Feb 26, 2008
Messages
31
onlyadrafter,

Thanks. With a little modifcation it works fine.
I appreciate the help.

Regards,
Tod
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,784
Members
414,020
Latest member
Meghdad

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
Top