Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automated sheet copying and naming

Hello all,

I am sure some of you will be able to help me.... but would you also like to
help?


I have a workbook for keeping track of competitions.
On the first worsheet I have an overview of results from the other
worksheets.
The second worksheet is a model for all other sheets.
In worksheet 1, cell a1 is the name (or date) of an event. Worksheet 3
should get the name of the event in that specific cell.
In worksheet 1, cell a2 is the name (or date) of enother event. Worksheet 4
should get the name of the event in cell a2.

In this way, I have to make a copy of the model worksheet and then give the
name in worksheet 1, cell a2 and next time of course, a3... and so on.
It would be terrific if Excel could make a copy of the model sheet and give
it the name of the event in ce a2, a3.. and so on, at the moment I give a
name in that cell.

I hope you understand my idea.

Also it would be very neat if it also works on Pocket excel (windows Pocket
PC 2003).


Thank you all,
Pierre


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Automated sheet copying and naming

This requires VBA. Pocket excel does not support VBA to the best of my
knowledge.


Beyond that, use the Change event in the First worksheet.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim sh As Worksheet
If Target.Count 1 Then Exit Sub
If Target.Column = 1 Then
If Not IsEmpty(Target) Then
If IsDate(Target) Then
sName = Format(Target, "yyyymmdd")
Else
sName = Target.Value
End If
On Error Resume Next
Set sh = Worksheets(sName)
On Error GoTo 0
If sh Is Nothing Then
Worksheets(2).Copy after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = sName
Else
MsgBox sName & " already exists"
End If
End If
Me.Activate
End If
End Sub



Right click on the tab of the overview sheet and select view code. Put in
code similar to the above.

--
Regards,
Tom Ogilvy


"Pierre De Cat" wrote in message
...
Hello all,

I am sure some of you will be able to help me.... but would you also like

to
help?


I have a workbook for keeping track of competitions.
On the first worsheet I have an overview of results from the other
worksheets.
The second worksheet is a model for all other sheets.
In worksheet 1, cell a1 is the name (or date) of an event. Worksheet 3
should get the name of the event in that specific cell.
In worksheet 1, cell a2 is the name (or date) of enother event. Worksheet

4
should get the name of the event in cell a2.

In this way, I have to make a copy of the model worksheet and then give

the
name in worksheet 1, cell a2 and next time of course, a3... and so on.
It would be terrific if Excel could make a copy of the model sheet and

give
it the name of the event in ce a2, a3.. and so on, at the moment I give a
name in that cell.

I hope you understand my idea.

Also it would be very neat if it also works on Pocket excel (windows

Pocket
PC 2003).


Thank you all,
Pierre




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
How to create Login & Log out Spread sheet in Excel with automated Attendance sheet marc5354 Excel Worksheet Functions 2 September 21st 10 04:22 PM
Help with the first sheet to be automated. Igneshwara reddy[_2_] Excel Worksheet Functions 2 June 13th 08 11:00 PM
naming tabs automated officegirl Excel Discussion (Misc queries) 6 January 9th 08 03:46 PM
Automated Naming of ranges... gman[_2_] Excel Programming 1 August 8th 03 12:57 AM
Automated copying & pasting from multiple sources Averil Pretty Excel Programming 0 July 10th 03 03:45 AM


All times are GMT +1. The time now is 11:55 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"