View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default parsing a date field

Assuming 01-01-2005 in A1

In B1 enter =MONTH(A1)

In C1 enter =YEAR(A1)

Copy and paste specialvalues then delete column A


Gord Dibben MS Excel MVP

On Tue, 1 Aug 2006 16:11:23 -0400, carriex3
wrote:


I have data that was imported from another system (don't know what
system). The date field shows as 01-01-2005. I need to split the
field so that the month is one cell and the year in another (don't need
day). I tried the usual right(a1,2) type command, but I get 53
returned. I tried to first convert the date to text, but then I get
the full five digit date.

I'm sure that there is an easy solution to this, but I don't know what
it is and couldn't locate it in the board archives.

Thank you!!

Carrie