Excel-Formatting Tab Name

Hi

Excel allows us to format the dates in a cell as shown:
10/23/2012
Tue 23-Oct ddd dd-mmm

Please let me know if there is any way to format the Tab Name as shown above other than renaming it.

Thanks & Regards
Kumar

Almir's picture

Excel-Formatting Tab Name

I agree with Nick on this. Maybe you put all your data together on a single sheet and add a column with a date (now sheet name). Then you could create pivot table and filter it by date.

Almir's picture

Excel-Formatting Tab Name

Do you think of formatting existing name of tab to another format? Not as far as I know. Maybe something could be done through VBA, but I am not sure: some kind of extracting sheet name as text, use it as variable date, apply specific format, then return text of such format as a new sheet name. But... I am just thinking aloud.

Excel-Formatting Tab Name

Yes Almir, I mean formatting name of tab. Thanks for the response.
I am completely unaware of VBA.
Please let me know if you can put your thought in practice through VBA.

Regards
Kumar.

Almir's picture

Excel-Formatting Tab Name

Well, I am not sure how to accomplish this through VBA. I believe Nick could help.

Nick's picture

lets take a step back..how

lets take a step back..

how are these sheet names being populated ?

To me, it sounds like you could be using a pivot table and not have to do something like this..

Anyway... u could do something like this:

put this code in the 'ThisWorkBook' macro module... (but I really don't recommend it)

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
 
    On Error Resume Next
    Sh.Name = Format(Sh.Name, "ddd dd-mmm")
End Sub

Thank you for the response

Thank you for the response Nick.
I normally name the tabs like this: I input the operators' statistics into regular sheets.
10/1/2012 10/2/2012 so on..10/24/2012 10/25/2012 so on..10/31/2012
In order to differentiate between Saturdays and Weekdays, I wanted to rename them as:
Mon 01-Oct Tue 02-Oct so on.. Wed 24-Oct Thu 25-Oct so on.. Wed 31-Oct

So, wanted to know if there is a way to format them (like we do within the cells) rather than renaming them.

Let me know if you require further information.

Thanks & Regards
Kumar.

Nick's picture

ok, well I still think you

ok, well I still think you should use a pivot table rather than tab names...

but the short answer is: no, you cannot format sheet tabs

You can however use the code I provided...

Excel-Formatting Tab Name

Thank you Nick.

Regards
Kumar.