View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default perm change of date not just format

Select the cells you want to update and run:

Sub day_killer()
For Each r In Selection
With r
s = Split(.Text, "/")
.NumberFormat = "@"
.Value = s(0) & "/" & s(2)
End With
Next
End Sub

--
Gary''s Student - gsnu200747


"charlie" wrote:

I would like to have just the month and year left when I'm done

"Wondering" wrote:

Excel stores dates as numbers. The dates start with 1/1/1900 which is day 1.
1/2/1900 is day 2. The date 1/13/2007 is actually stored as the number
39095. There is no "day" in the number 39005. Excel calculates the day
based on the number 39095. Do you want the text "1/2007" to be the result in
the cell?

Dave



"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after