Macro problem

G

Guest

Is there a macro to name the sheet the name of a cell, with a slight change?
e.g. the cell is : M-13.06.2005, and i want the sheet to be named M-13.06.05.
However i would like to name 5 days of the week, everytime the macro is run,
i.e. it names monday-friday each time.

any help would be hugely appreciated.
Bonbon
 
G

Guest

Just an example:


In Sheet1, A1, enter: M-13.06.2005
In Sheet1, B1, enter: =REPLACE(A1,9,2,D1) & " "&TEXT(TODAY(),"DDDDD")

Then enter and run the following macro:

Sub Macro1()
Sheets("Sheet1").Select
Sheets("Sheet1").Name = Range("B1").Value
End Sub
 
G

Guest

Cool, but what should i do if i need it to name 5 days? Because that macro
changes one sheets name.

Thx again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top