Converting portion of tab name to Date

cstimart

Well-known Member
Joined
Feb 25, 2010
Messages
1,180
I have a tab with a name of "Week Ending 03.02.11"

I am trying to create a function to put the date of 03/02/11 into a variable, but it's converting it to an AM/PM format. Any Suggestions?

here's the relevant portion of the code/function...

Code:
Function Days()
Dim nm As Date
Dim i As Integer
nm = Right(Worksheets(1).Name, 8)
.
.
.
End Function
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Watch MrExcel Video

Forum statistics

Threads
1,109,331
Messages
5,528,052
Members
409,800
Latest member
camronmartin

This Week's Hot Topics

Top