New Spreadsheet

analyst3

New Member
Joined
Jun 18, 2014
Messages
36
Hello I an excel workbook with 2 tabs. Clients and questions. I have a list of names about 50 in column A of the "Clients" sheet. I would like to create a macro that goes down that list and creates a new excel spreadsheet with the name of the client as the sheet name. The sheet I want to have copied over for each client is called "Questions", it has about 20 questions. So basically I would like to have the same sheet for the 50 clients and their name on the sheet. Ideally the macro would go down the list and create 50 sheets, same questions for all and the client name on each sheet. thanks again
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
How about
VBA Code:
Sub analyst()
   Dim Cl As Range
   
   With Sheets("Clients")
      For Each Cl In .Range("A2", .Range("A" & Rows.Count).End(xlUp))
         If Not Evaluate("isref('" & Cl.Value & "'!A1)") Then
            Sheets("Questions").Copy , Sheets(Sheets.Count)
            ActiveSheet.Name = Cl.Value
         End If
      Next Cl
   End With
End Sub
 
Upvote 0
thanks one more question, is there a way to add account # on each of the newly created tabs ? the clients tab has an account number in column B next to each client name, is there a way to put that account number on the newly created sheet for that client in cell G8
 
Upvote 0
Yup, try
VBA Code:
Sub analyst()
   Dim Cl As Range
   
   With Sheets("Clients")
      For Each Cl In .Range("A2", .Range("A" & Rows.Count).End(xlUp))
         If Not Evaluate("isref('" & Cl.Value & "'!A1)") Then
            Sheets("Questions").Copy , Sheets(Sheets.Count)
            ActiveSheet.Name = Cl.Value
            ActiveSheet.Range("G8").Value = Cl.Offset(, 1).Value
         End If
      Next Cl
   End With
End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,214,618
Messages
6,120,544
Members
448,970
Latest member
kennimack

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