#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bonbon
 
Posts: n/a
Default Macro problem

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Macro problem

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

--
Gary''s Student


"Bonbon" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bonbon
 
Posts: n/a
Default Macro problem

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

Thx again

"Gary''s Student" wrote:

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

--
Gary''s Student


"Bonbon" wrote:

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

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
deleting a macro resulted in a problem militant Excel Discussion (Misc queries) 0 April 26th 05 05:21 AM
Circular Problem needs Macro NICK Excel Discussion (Misc queries) 2 February 1st 05 09:09 AM
External data Macro Problem Excel 97 Craig Kelly Excel Discussion (Misc queries) 1 January 17th 05 03:17 PM
Problem executing a macro from different workbook where it is Sergio Calleja Excel Discussion (Misc queries) 1 January 17th 05 12:38 PM
macro problem Kevin Excel Discussion (Misc queries) 1 December 14th 04 10:47 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"