Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Macro to copy and populate an egsisting ssheet and save it.

Hi everybody,
I have a spreadsheet (Spreadsheet A) with a table in it having different
data like this:

Schematic 1 200 210 205
Schematic 2 160 200 300

There are about 300 rows and 20 columns in that table.
I also have a second spreadsheet (Spreadsheet B) with a simple schematic in
it.

What I want to do is:
1: To populate some certain cells in Spreadsheet B (where the schematic is)
based on the data of the first row in the table (200, 210, 205€¦€¦)
2: rename and save this spreadsheet (either separately or as a new sheet in
the same workbook) with the value/name given in the first cell of the first
row.
3: repeat the procedure for the next row.

Let me know if smth unclear.

Can you also please answer in Macro for dummies as I can record a macro,
maybe change some code in it but than thats it.

Many many many thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
Tim Tim is offline
external usenet poster
 
Posts: 408
Default Macro to copy and populate an egsisting ssheet and save it.

Ok, I just experimented with a code which copies the sheet "schematic" in the
same workbook and renames it based on values found in the "Table" spreadsheet.
What I want still to do, is to populate certain cells in the newly created
sheet with cell values taken from the same row as the name, in the table
sheet. Below is the code that I wrote so far:

Sub Copy_Sheets()

Dim i As Integer
Dim wks As Worksheet

Set wks = Sheets("Table")

For i = 3 To 250
Sheets("Schematic").Copy after:=Sheets(2)
ActiveSheet.Name = wks.Cells(i, 1)
ActiveSheet.Cells(1, 2) = wks.Cells(i, 1)
Next

End Sub

"Tim" wrote:

Hi everybody,
I have a spreadsheet (Spreadsheet A) with a table in it having different
data like this:

Schematic 1 200 210 205
Schematic 2 160 200 300

There are about 300 rows and 20 columns in that table.
I also have a second spreadsheet (Spreadsheet B) with a simple schematic in
it.

What I want to do is:
1: To populate some certain cells in Spreadsheet B (where the schematic is)
based on the data of the first row in the table (200, 210, 205€¦€¦)
2: rename and save this spreadsheet (either separately or as a new sheet in
the same workbook) with the value/name given in the first cell of the first
row.
3: repeat the procedure for the next row.

Let me know if smth unclear.

Can you also please answer in Macro for dummies as I can record a macro,
maybe change some code in it but than thats it.

Many many many thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to save and close, then copy file NewSysAdmin Excel Discussion (Misc queries) 2 December 2nd 09 03:24 PM
Using Macro to Save Copy of File to New Location Chris Z Excel Discussion (Misc queries) 3 September 12th 06 11:26 PM
creat a macro to save a copy with different file name yrndtn Excel Discussion (Misc queries) 2 September 8th 06 01:14 PM
How to save a file without overwrite or save a copy? SettingChange Setting up and Configuration of Excel 1 November 3rd 05 02:10 AM
Use a Macro to Save a Copy of a Workbook? Joe D[_4_] Excel Programming 3 July 14th 05 03:29 PM


All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"