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
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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
 
Upvote 0
onlyadrafter,

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

Regards,
Tod
 
Upvote 0

Forum statistics

Threads
1,215,497
Messages
6,125,155
Members
449,208
Latest member
emmac

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