Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with some VBA code to copy and paste on new worksheets
I am trying to write a macro to copy data from one sheet to individual worksheets The data is stock prices Each stock has 2 columns worth: Date and Price I wish to: Copy the template tab to create a duplicate worksheet copy column A and column B data Paste into column A and B of the new duplicate worksheet Name the worksheet with the data in Row1 and then do the same for the next set of data - in Column D and E and then again for the next data in G and H ...etc potentially around 600 stocks sample data attached many thanks Rob +-------------------------------------------------------------------+ |Filename: sample data.xls | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=110| +-------------------------------------------------------------------+ -- gwatcheater ------------------------------------------------------------------------ gwatcheater's Profile: http://www.thecodecage.com/forumz/member.php?userid=235 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86422 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with some VBA code to copy and paste on new worksheets
Are you ROB? The code I wrote for the next posting uses the same code.
"gwatcheater" wrote: I am trying to write a macro to copy data from one sheet to individual worksheets The data is stock prices Each stock has 2 columns worth: Date and Price I wish to: Copy the template tab to create a duplicate worksheet copy column A and column B data Paste into column A and B of the new duplicate worksheet Name the worksheet with the data in Row1 and then do the same for the next set of data - in Column D and E and then again for the next data in G and H ...etc potentially around 600 stocks sample data attached many thanks Rob +-------------------------------------------------------------------+ |Filename: sample data.xls | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=110| +-------------------------------------------------------------------+ -- gwatcheater ------------------------------------------------------------------------ gwatcheater's Profile: http://www.thecodecage.com/forumz/member.php?userid=235 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86422 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with some VBA code to copy and paste on new worksheets
thank Joel - just what I am after... can I ask for one small tweak Can I use a sheet called "Template" and copy this each time - pasting in the data (rather than creating a new blank worksheet?!) still using the contents of row 1 as the sheet label -- gwatcheater ------------------------------------------------------------------------ gwatcheater's Profile: http://www.thecodecage.com/forumz/member.php?userid=235 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86422 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with some VBA code to copy and paste on new worksheets
from Set NewSht = Sheets.Add(after:=Sheets(Sheets.Count)) to Sheets("Template").copy after:=Sheets(Sheets.Count) Set NewSht = Activesheet "gwatcheater" wrote: thank Joel - just what I am after... can I ask for one small tweak Can I use a sheet called "Template" and copy this each time - pasting in the data (rather than creating a new blank worksheet?!) still using the contents of row 1 as the sheet label -- gwatcheater ------------------------------------------------------------------------ gwatcheater's Profile: http://www.thecodecage.com/forumz/member.php?userid=235 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86422 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with some VBA code to copy and paste on new worksheets
fantastic.... THANK YOU VERY MUCH!!!!!! -- gwatcheater ------------------------------------------------------------------------ gwatcheater's Profile: http://www.thecodecage.com/forumz/member.php?userid=235 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86422 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and transpose paste across several worksheets | Excel Programming | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Copy and Paste between 2 worksheets with VBA | Excel Worksheet Functions | |||
Copy Paste Special Value using Code over Several Worksheets | Excel Programming | |||
Copy/Paste to all Worksheets | Excel Programming |