Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How can I return a formatted date as a serial number in
Excel 97? FormatNumber(TheDate) works in Excel 2002, but is not supported in Excel 97. David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Format function
MsgBox Format(Range("a1"), "0") -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "David" wrote in message ... How can I return a formatted date as a serial number in Excel 97? FormatNumber(TheDate) works in Excel 2002, but is not supported in Excel 97. David |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
? FormatNumber(date)
37,922.00 ? format(date,"##,###.00") 37,922.00 ? cdbl(date) 37922 -- Regards, Tom Ogilvy "David" wrote in message ... How can I return a formatted date as a serial number in Excel 97? FormatNumber(TheDate) works in Excel 2002, but is not supported in Excel 97. David |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This will do what you want.
Selection.NumberFormat = "0" Good Luck Mic -----Original Message----- How can I return a formatted date as a serial number in Excel 97? FormatNumber(TheDate) works in Excel 2002, but is not supported in Excel 97. David . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Depends what you mean by "serial number"!
My guess is you mean a date like today's: 10/28/03 returns the number 20031028, in which case you could give the cell a custom format, "yyyymmdd" or you could use a formula like this: =YEAR(B1)&MONTH(B1)&DAY(B1) HTH, Shockley "David" wrote in message ... How can I return a formatted date as a serial number in Excel 97? FormatNumber(TheDate) works in Excel 2002, but is not supported in Excel 97. David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how to return a serial number to a date | Excel Discussion (Misc queries) | |||
how to now what date represent a serial number? | Excel Worksheet Functions | |||
convert serial number into date | Excel Discussion (Misc queries) | |||
Serial number of Date | Excel Worksheet Functions | |||
Convert date to serial number in VBA | Excel Programming |