View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
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