Stumbleupon Facebook Twitter Digg Google Delicious Linkedin
TechNews

change sheet name

Posted: 16 Jan 2012

Tags: change sheet name change sheet name


change sheet name

Source: www.useexcel.com

Question:

I have a spreadsheet is a time sheet for our staff with a card for each day of the month.

and then at the end of the month, I use a macro to delete all data and change the dates during dates for the following month.

However, I currently have the leaves appointed and foot, etc. Day2 as would it be too much hassle to re-name manually leaves for the relevant dates of each month. Is there a macro that would do this? It has a list of these dates in the worksheet that update each beginning the macro could get it.

I hope it is clear, and thank you much,

G

Answer:

Thanks Mike,

That's great! When you change the date format, it does not appear to make a difference for the sheet, it always shows the full (eg - 25_Jan_2012). I would prefer to have only 25 Jan if possible.

Is there a way to do so?

MT


Hello

It is the code that you change to get the correct formatting, try the same for Jan 1, Jan 2, etc

Sub Re_Name_sheets()
Dim x As Long
On error resume next
X = 1 to Selection.Cells.Count
Sheets (x).Name = Format (Selection.Cells (x).)(Value, "dd mmm")
Next
End Sub

Rate this article:

change sheet name
change
sheet
name

  • Pages:
  • 1

0 Comments

Add Your Comment !