Date Display
It is a language available to Excel to allow automation of steps you do
manually. For example:
Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Set r = Range("A1")
If Intersect(t, r) Is Nothing Then Exit Sub
v = t.Text
Dim d As Date
d = DateSerial(Right(v, 4), Left(v, 2), Mid(v, 3, 2))
Application.EnableEvents = False
r.Value = d
Application.EnableEvents = True
will wait until you enter the number in A1 and then change it to a date.
This way only one cell is used, not two.
--
Gary''s Student - gsnu200756
"Patty" wrote:
What is VBA?
"Gary''s Student" wrote:
You can use another cell:
=DATE(RIGHT(D23,4),LEFT(D23,2),MID(D23,3,2))
or you can use VBA to do the same thing in a single cell.
--
Gary''s Student - gsnu200756
"Patty" wrote:
How can I configure a cell so that I can enter 11152007 as a date and have it
display as 11/15/2007?
Thanks,
patty
|