Dated Tab Name into Cell

lapta301

Well-known Member
Joined
Nov 12, 2004
Messages
1,001
Office Version
  1. 365
Platform
  1. Windows
Dear All

Could I trouble you for some help bringing the tab value into a cell.

I have dated tabs in the format 2011-02-20 and would like a formula in say A3 to bring in the sheet date in the format dd-mmm-yy.

As ever my grateful thanks for your help.
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi there,

This will put each sheet name in cells A3 -> A (total number of sheets):

Code:
Sub test()
    For i = 1 To Sheets.Count
        Range("A" & i + 2).Value = Sheets(i).Name
    Next
End Sub

Or if you only have 1 sheet you want to use:

Code:
Sub test()
    Range("A3").Value = Sheets("2011-02-20").Name
End Sub
 
Upvote 0
This will get you the text like that:
Code:
=TEXT(DATE(LEFT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,999),4),MID(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,999),6,2),RIGHT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,999),2)),"dd-mmm-yy")
Or you could remove the TEXT( and ,"dd-mmm-yy") parts to generate an Excel date serial number and format the cell to be dd-mmm-yy instead.
 
Upvote 0
Richard, GlennUK & JamesW

That's great thank you all so much for such a quick varied response.

Steve
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top