View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
via135
 
Posts: n/a
Default extract year from the date in a cell


hi!

B1: =TEXT(YEAR(A1),"0 0 0 0")

assuming that the date 1/1/2006 is in A1

-via135

DKY Wrote:
I have a cell with 01/01/2006 in it, and I'm trying to extract the 2006
but when I put =Left(b9,4) it returns 8718.
I'm also trying to pull the 2006 and put spaces in between it like so
2 0 0 6

Does anyone know how to do these two things?



--
via135
------------------------------------------------------------------------
via135's Profile: http://www.excelforum.com/member.php...o&userid=26725
View this thread: http://www.excelforum.com/showthread...hreadid=523216