Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello-
I have a workbook that will always have a sheet name such as 082509. I want to have cell J2 take that string and convert to a MM/DD/YY format. I tried the following, but it did not work: Range("J2").Select ActiveCell.FormulaR1C1 = DateValue(Format(Range(Worksheet (1)).Value, "00/00/00")) Any ideas? Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
maybe...
I'd use: With ActiveSheet.Range("J2") .NumberFormat = "mm/dd/yy" 'whatever you want .Value = DateValue(Format(Worksheets(1).Name, "00/00/00")) End With Sabosis wrote: Hello- I have a workbook that will always have a sheet name such as 082509. I want to have cell J2 take that string and convert to a MM/DD/YY format. I tried the following, but it did not work: Range("J2").Select ActiveCell.FormulaR1C1 = DateValue(Format(Range(Worksheet (1)).Value, "00/00/00")) Any ideas? Thanks -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Sep 3, 6:57*pm, Dave Peterson wrote:
maybe... I'd use: With ActiveSheet.Range("J2") * * .NumberFormat = "mm/dd/yy" 'whatever you want * * .Value = DateValue(Format(Worksheets(1).Name, "00/00/00")) End With Sabosis wrote: Hello- I have a workbook that will always have a sheet name such as 082509. I want to have cell J2 take that string and convert to a MM/DD/YY format. I tried the following, but it did not work: Range("J2").Select * * ActiveCell.FormulaR1C1 = DateValue(Format(Range(Worksheet (1)).Value, "00/00/00")) Any ideas? Thanks -- Dave Peterson Dave, thanks for the help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to convert string to date | Excel Worksheet Functions | |||
How I convert date formatt of dd/mm/yy to mm/yy (not cell format) | Excel Discussion (Misc queries) | |||
Convert Date to STring | Excel Discussion (Misc queries) | |||
Excel 2000 worksheet where I want to convert date format | Excel Discussion (Misc queries) | |||
Can i convert numbers into string format? | Excel Discussion (Misc queries) |