PC Review


Reply
Thread Tools Rate Thread

Change the name of worksheet by cell reference?

 
 
=?Utf-8?B?RnJhbmsgUHl0ZWw=?=
Guest
Posts: n/a
 
      21st Sep 2007
I am trying to set the name of a worksheet tab by referencing a cell. For
instance:

Sheet 1 is named "Week Begin: ".
In cell a1 I put the date: 9/17/07.
Sheet 1 is now named "Week Begin: 9/17/07".

Is this possible?

God Bless

Frank Pytel
 
Reply With Quote
 
 
 
 
David McRitchie
Guest
Posts: n/a
 
      21st Sep 2007
Hi Frank,
You realize you need a macro:
http://www.mvps.org/dmcritchie/excel....htm#havemacro

Would suggest you put the date in yyyy-mm-dd format
so you can sort worksheets.
http://www.mvps.org/dmcritchie/excel...#sortallsheets

sub testxyz()
On Error Resume Next
ActiveSheet.Name = "Week Begin " & Format(Range("A1"), "yyyy-mm-dd")
If Err.Number <> 0 Then
MsgBox Err.Number & " " & Err.Description
End If
On Error GoTo 0
End Sub

You cannot use a colon in the worksheetname, Excel 2007 does not warn tell
you when you try to type in invalid characters into the sheetname : \ / ? * [ or ]
but it will not let you key it in. With the macro you would
get an error with the appropriate message with err.description
--
HTH,
David McRitchie, Microsoft MVP -- Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm


"Frank Pytel" <(E-Mail Removed)> wrote in message news:44D740E8-1C8C-4D12-8A90-(E-Mail Removed)...
>I am trying to set the name of a worksheet tab by referencing a cell. For
> instance:
>
> Sheet 1 is named "Week Begin: ".
> In cell a1 I put the date: 9/17/07.
> Sheet 1 is now named "Week Begin: 9/17/07".
>
> Is this possible?
>
> God Bless
>
> Frank Pytel

 
Reply With Quote
 
=?Utf-8?B?RnJhbmsgUHl0ZWw=?=
Guest
Posts: n/a
 
      21st Sep 2007
David;

Thanks. I really appreciate the info. Problem is that VBA is a last resort
for me. I don't like VBA. Errors and Warnings, not code!. Just to
untrustworthy in today's world. I will try to hold out for non VBA solution
first. Thanks.

God Bless

Frank Pytel

"David McRitchie" wrote:

> Hi Frank,
> You realize you need a macro:
> http://www.mvps.org/dmcritchie/excel....htm#havemacro
>
> Would suggest you put the date in yyyy-mm-dd format
> so you can sort worksheets.
> http://www.mvps.org/dmcritchie/excel...#sortallsheets
>
> sub testxyz()
> On Error Resume Next
> ActiveSheet.Name = "Week Begin " & Format(Range("A1"), "yyyy-mm-dd")
> If Err.Number <> 0 Then
> MsgBox Err.Number & " " & Err.Description
> End If
> On Error GoTo 0
> End Sub
>
> You cannot use a colon in the worksheetname, Excel 2007 does not warn tell
> you when you try to type in invalid characters into the sheetname : \ / ? * [ or ]
> but it will not let you key it in. With the macro you would
> get an error with the appropriate message with err.description
> --
> HTH,
> David McRitchie, Microsoft MVP -- Excel
> My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
>
>
> "Frank Pytel" <(E-Mail Removed)> wrote in message news:44D740E8-1C8C-4D12-8A90-(E-Mail Removed)...
> >I am trying to set the name of a worksheet tab by referencing a cell. For
> > instance:
> >
> > Sheet 1 is named "Week Begin: ".
> > In cell a1 I put the date: 9/17/07.
> > Sheet 1 is now named "Week Begin: 9/17/07".
> >
> > Is this possible?
> >
> > God Bless
> >
> > Frank Pytel

>

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      22nd Sep 2007
Frank

While waiting for the non VBA solution, do not hold your breath.


Gord Dibben MS Excel MVP

On Fri, 21 Sep 2007 11:44:02 -0700, Frank Pytel
<(E-Mail Removed)> wrote:

>Thanks. I really appreciate the info. Problem is that VBA is a last resort
>for me. I don't like VBA. Errors and Warnings, not code!. Just to
>untrustworthy in today's world. I will try to hold out for non VBA solution
>first. Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shortcut to change change cell reference to Absolute reference? =?Utf-8?B?cmljaGs=?= Microsoft Excel Worksheet Functions 12 5th Dec 2009 12:24 AM
change change cell reference to Absolute reference art Microsoft Excel Misc 5 13th Mar 2008 02:41 AM
How to change reference to other worksheet by changing one cell? =?Utf-8?B?TXMuVmFobA==?= Microsoft Excel Worksheet Functions 2 10th Nov 2005 06:56 AM
Worksheet reference (i.e placing worksheet name in a cell) =?Utf-8?B?Um9nZXIgUm9nZXI=?= Microsoft Excel Worksheet Functions 1 20th Jan 2005 03:40 PM
Reference worksheet by using contents of cell as worksheet name macummi Microsoft Excel Misc 2 31st Oct 2003 12:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:48 PM.