View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
count count is offline
external usenet poster
 
Posts: 64
Default Add sheet and rename with cell contents

It seems that you can name the sheet according to date and not to some cell
content - see below
We pull some server data using a VBS script, which is
then placed in a .csv file. To make things easier on the
non-excel users, I want ot automate putting the data in
the workbook. So my goal is to have a macro that they run
that does the following:

Inserts new sheet
Imports data from the file
Adds a column
Creates a new formula and pastes it down through the
column
Defines a few names in the sheet
Places the current date in a cell 'so you know it's a date, you know

its value...so
ActiveSheet.Name = Left(Date,10) ' or other format as Mudraker points
out
Date is replaced as a value so it doesn't change
[cut Use date value as sheet name.]

I'm good to go all the way down to the last part "Use
date value as sheet name". So if the date value ends up
in J1, how can I get that value as the sheet name?

Thanks a bunch,

Rudy