Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default tabs by dates

Not sure that this is possible by simply recording a macro. Is there a way
to code this by visual basic?

I have a spreadsheet that has a request date column...I am looking to create
a macro that creates a tab for each year, and then takes the information in
the spreadsheet and breaks it out by tab (e.g taking a workbook with one tab
for years 2003-2008, and making a workbook with six tabs showing information
by year)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default tabs by dates

You can record a macro and then make simply changes as required.

here is the code for adding the sheets


For MyYear = 2003 To 2008
Set newsht = Sheets.Add(after:=Sheets(Sheets.Count))
newsht.Name = MyYear
'add recorded code here with modification to use newsht
Next MyYear


for MyYear = 2003 to 2008
sheets.add after:=sheets(sheets.count)
activesheet.name = MyYear
next MyYear

"joemeshuggah" wrote:

Not sure that this is possible by simply recording a macro. Is there a way
to code this by visual basic?

I have a spreadsheet that has a request date column...I am looking to create
a macro that creates a tab for each year, and then takes the information in
the spreadsheet and breaks it out by tab (e.g taking a workbook with one tab
for years 2003-2008, and making a workbook with six tabs showing information
by year)

  #3   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default tabs by dates

Joe

Without knowing the format of your data I can't be sure, but, it seems
like this may be something well suited to a pivot table, applying the
Show Pages option.

If the data is suitable to a pivot table you can put the year in the
Page Field, elect to Show Pages, and you will have a sheet for each
year with the data, without a macro or without doing much of anything.

Good luck.

Ken
Norfolk, Va



On May 7, 2:49*pm, Joel wrote:
You can record a macro and then make simply changes as required.

here is the code for adding the sheets

For MyYear = 2003 To 2008
* *Set newsht = Sheets.Add(after:=Sheets(Sheets.Count))
* *newsht.Name = MyYear
* 'add recorded code here with modification to use newsht
Next MyYear

for MyYear = 2003 to 2008
* *sheets.add after:=sheets(sheets.count)
* *activesheet.name = MyYear
next MyYear



"joemeshuggah" wrote:
Not sure that this is possible by simply recording a macro. *Is there a way
to code this by visual basic?


I have a spreadsheet that has a request date column...I am looking to create
a macro that creates a tab for each year, and then takes the information in
the spreadsheet and breaks it out by tab (e.g taking a workbook with one tab
for years 2003-2008, and making a workbook with six tabs showing information
by year)- Hide quoted text -


- Show quoted text -


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
Pulling dates meeting certain criteria into different TABs Tom Excel Discussion (Misc queries) 3 June 8th 09 04:46 PM
Vlookup Different tabs based on Dates andy Excel Worksheet Functions 5 April 23rd 09 04:53 PM
tabs are missing even though 'tools-options-view-sheet tabs' ok? rgranell Excel Worksheet Functions 3 August 16th 08 04:25 PM
hide tabs from view then lock tabs? slowboat Excel Discussion (Misc queries) 1 December 19th 07 07:06 AM
Worksheet Tabs Names as Dates Pieman Excel Worksheet Functions 4 March 6th 06 11:54 PM


All times are GMT +1. The time now is 06:51 PM.

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

About Us

"It's about Microsoft Excel"