#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 55
Default nameing a worksheet

Is it possible to name a sheet based on 2 cell values with either a formula
or VB?

Example
A1=4/20/09
B2=Help

worksheet name is Help 4/20/09

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default nameing a worksheet

"/" is not an accepted character for sheet names. So you need to change that
to something else. I have used Format() function to have the date in a
different format. Try the below code from Immediate window and see. Launch
VBE using Alt+F11 and Ctrl+G to view the immediate window

A1=4/20/09
B2=Help

Activesheet.name = Range("A2") & " " & Format(Range("A1"),"mm-dd-yyyy")

If this post helps click Yes
---------------
Jacob Skaria


"Lost" wrote:

Is it possible to name a sheet based on 2 cell values with either a formula
or VB?

Example
A1=4/20/09
B2=Help

worksheet name is Help 4/20/09

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default nameing a worksheet

You can also refer the sheet using the Sheet name or the Sheet index number.

Sheets("Sheet1").Name = "<New Name"
Sheets(1).Name = "<New Name"

If this post helps click Yes
---------------
Jacob Skaria


"Lost" wrote:

Is it possible to name a sheet based on 2 cell values with either a formula
or VB?

Example
A1=4/20/09
B2=Help

worksheet name is Help 4/20/09

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
Nameing cells in workbook Mike Busch[_2_] Excel Discussion (Misc queries) 3 October 6th 08 10:59 PM
column nameing PAUL~H~UK Excel Discussion (Misc queries) 7 October 16th 06 11:36 PM
plot graph from multiple worksheet as embedded chart object on every worksheet [email protected] Excel Discussion (Misc queries) 2 August 24th 06 05:26 PM
Upload multiple text files into 1 excel worksheet + put the filename as the first column in the worksheet Aster Excel Worksheet Functions 3 March 12th 06 09:58 AM
In nameing a sheet in Excel it puts a .xls] in front why? EZE Excel Discussion (Misc queries) 2 April 27th 05 04:27 AM


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